Git related cheat and sheet

Published at 26, September 2008, author art. Tags: git, tips

I have found yesterday a two articles about a GIT.

The cheat is a post by Ryan Tomayko, where Ryan shows how to deal with «The Tangled Working Copy Problem». First, he explain, how to make separate commits with SVN, using patch command. Next, Ryan give an example of git-add --patch usage, to solve this problem in more elegant manner.

And finally, I found an excellent GIT cheat sheet at http://cheat.errtheblog.com. There are many useful GIT commands are explained in this sheet, so I won't list them all, but only mention most interesting for me.

One of the interesting abilities, explained in this sheet is 'colors' and 'aliases'. Do you know, that it is possible to colorize git's output and to use shortcuts in the command line?

For example, you can add these lines in your ~/.gitconfig

[alias]
    st = status
    ci = commit
    br = branch
    co = checkout
    df = diff
    lg = log -p

And use git st instead of git-status or git status.

Also, sometimes git commit --amend can be useful, to adjust latest commit and add a new files to it or change comment.

That's all for now. Don't forget to subscribe to RSS to receive latest updates!

Comments

Subscribe on this post's comments

No comments. Wanna be first?

First, identify yourself and come back to leave comments.

If you wish to leave comment, please, identify yourself and then come back to this page.