git difftool to give directory compare?

Update June 2012 (2 and an half years later): This (comparing directories instead of file-by-file) seems to be soon available: See [ANNOUNCE] Git 1.7.11.rc1: “git difftool” learned the “–dir-diff” option to spawn external diff tools that can compare two directory hierarchies at a time after populating two temporary directories, instead of running an instance of … Read more

Git slows down Emacs to Death – How to Fix this?

There’s a built-in profiler called ELP. You can try something like M-x elp-instrument-package, enter “vc”, and then try finding a file. Afterwards, M-x elp-results will show you a profile report. (Note that if the time is instead being spent in non-vc-related functions, this technique will not show it, but you can instrument further packages if … Read more

How to make ‘git diff’ ignore comments

Here is a solution that is working well for me. I’ve written up the solution and some additional missing documentation on the git (log|diff) -G<regex> option. It is basically using the same solution as in previous answers, but specifically for comments that start with a * or a #, and sometimes a space before the … Read more

Git create branch from range of previous commits?

You can do this with cherry-pick. If your history of long_branch looks like this: A-B <– master \ C-D-E-F-G-H <– long_branch and you want to move the contents of, say, F through H to a different branch, say, short_branch, which is based off of master: git checkout master -b short_branch which gives A-B <– master, … Read more

Merge, update, and pull Git branches without using checkouts

The Short Answer As long as you’re doing a fast-forward merge, then you can simply use git fetch <remote> <sourceBranch>:<destinationBranch> Examples: # Merge local branch foo into local branch master, # without having to checkout master first. # Here `.` means to use the local repository as the “remote”: git fetch . foo:master # Merge … Read more

How to Prevent Garbage Collection in GIT?

From the very same page you just linked to: Some git commands may automatically run git gc; see the –auto flag below for details. If you know what you’re doing and all you want is to disable this behavior permanently without further considerations, just do: $ git config –global gc.auto 0