‘git diff’ doesn’t show enough

The important thing to realize about git diff A B is that it only ever shows you the difference between the states of the tree between exactly two points in the commit graph – it doesn’t care about the history. The .. and … notations used for git diff have the following meanings: So when … Read more

How to see how many repos created from my repo template (GitHub)

Eureka! After reading this – Search based on the contents of a repository, the answer was clear! Search by README.md file content! Use GitHub’s search engine and provide a unique combination of words that appear in your README.md file. This is how I do it for my template – unfor19/terraform-multienv in:readme sort:updated -user:unfor19 “tfmultienv”github.com/search?q=in%3Areadme+sort%3Aupdated+-user%3Aunfor19+%22%60tfmultienv%60%22&type=repositories To … Read more

Git: merge only the changes made on the branch

This article advises to instead of merging two branches, you would rebase them where git would only rebase non duplicate commits. But instead of cherry-picking, you might consider just rebasing the branch: rebase –onto release B bug where release is the release branch and bug is the bug branch. You then get something like C’—D’ … Read more

Single file as Git submodule

If you can use symlinks (e.g. you are not using Windows), then you can set up core and core.php like this: # “base” repository layout: core/ core.app # each app repository layout: base/ core/ core.php core -> base/core/ core.php -> base/core.php app/ In each app repository, the base/ directory is either a submodule that uses … Read more

strategy for git and append-mostly files

You could use the gitattributes mechanism to define a custom merge driver (like this one for instance) in order to copy automatically the relevant sections. [merge “aggregate”] name = agregate both new sections driver = aggregate.sh %O %A %B It will be a 3-way merge, which means you can easily diff %A and %B against … Read more

How to put Excel VBA into git

If you use Rubberduck VBA, after clicking You can use the file menu to “Export Active Project”, which exports the form binaries and the code as BAS objects, which are just plain text. Then you can commit to git.