Posts tagged with git

Git notes

You can find a good reference for git notes here. Also, of course, git help notes. Notes can be used, for instance, to add extra information to a commit with...

Vim bundle submodule repository

I made the .vim/bundle folder into a repo of submodules. Find it here. In order to successfully clone and set up this folder, first clone bundle, then run gi...

Stage only part of a file in git

In order to add only some lines of a file for committing, use git add -p <filename>. If the file is new, use git add -N <filename>. Look up this ...

git reflog

In order to undo a commit, a reset, a merge, or anything involving refs, just take a look at git reflog and reset to the appropriate HEAD@{n}.

Undoing a git commit –amend

In order to undo a git commit --amend, take a look at the git reflog. HEAD@{1} will contain the commit just before the amend (assuming that the amend was mad...

Change tab stop size for git diff

Customize the tab stop size in git diff by using $ git config --global core.pager "less -x5,9". man less to look at all options.