Archive

Posts Tagged ‘git’

Adding Notes to Existing Commits in Git

January 14th, 2011 No comments

A really nice feature in Git is the ability to add notes to existing commits:

git notes add -m 'this concerns the foo issue as well (refs #0815)' 12a3df56

Editing existing notes is pretty easy as well:

git notes edit 12a3df56

Make sure to have a look at Evgenys extensive Git guide for further details and more hidden gems.

Tags:

Using WinMerge with git on Windows 7

November 28th, 2009 No comments

Though git is not my primary source code management tool, I use it whenever I work on complex code that I don’t want to commit yet. Or just to keep track of my local scripts.
And using “git difftool”, it is pretty simple to use third party tools like WinMerge for graphical diffs:

  1. Create a wrapper script (e.g. git-diff-wrapper.sh) and put it anywhere in your Windows path (%PATH%):
    #!/bin/sh
    "C:/Program Files/WinMerge/WinMergeU.exe" -e -ub "$1" "$2" | cat
  2. Update your .gitconfig to run this script whenever “git difftool” is invoked:
    # … more config …
    [diff]
    tool = winmerge
    [difftool "winmerge"]
    cmd = git-diff-wrapper.sh "$LOCAL" "$REMOTE"
    # … more config …

That’s it, no restart required ;)

Tags: ,
Performance Optimization WordPress Plugins by W3 EDGE