User:Brita/Configs/Git

= Git configuration =

These are my git-related configurations and tips. Feel free to use what you like, but please don't copy my name or email to your settings :)

I have most of my configurations at ~/.gitconfig. This is where settings end up when they are set with --global from the command line. These configs apply to blender and all the other projects I work on.

I have settings specific to blender at ~/blender-source/.git/config. Settings placed here do not affect other git projects and can override the global settings. To set options for the blender project only from the command line, don't pass --global or --system.

~/.gitconfig - contains my commit information, aliases and colors

~/blender-git/blender/.git/config - this is what I *added*

Settings like my email override the ones I defined in the global config file. The alias 'lg' is also being reset.
 * 'lg' prints the commit version log in a legible form (in my opinion) and constrains it to 2days. '2days' can be removed from the definition for flexibility, in which case the command should be used like 'git lg 3days' instead of 'git lg'.
 * 'lgme' shows my weekly progress, it is useful to build reports
 * 'pullb' is a short for the recommended way of pulling (note that I have pull with rebase set to true):
 * 'socmerge' fetches and merges from master into the branch I am currently working on (in this case the soc branch)
 * 'pushs' shows a log of commits to be pushed
 * 'fs' executes a command foreach submodule. The usage is: 'git fs pull' or 'git fs pushs', etc.

From Campbell:

Find out what I did over the last week - using media-wiki syntax for GitCommit & BugReport (nice for writing weekly logs)

Aggressive gc, (remove rubbish from stashes and deleted branches)

= Debugging with bisect = To search for a change that introduced a problem, git offers an utility for binary search. For this to be quick, it is a good idea to disable most options on the build configuration. git will now present the revision in the middle of the good and bad one. Compile, test, and tell git if it is a good or bad one: In the end, to cleanup the bisect state: