« Previous | Next»

git cheat sheet

Posted by coldtobi | 7 Jan, 2010, 13:01

A Cheat-sheet for not-so-often used or some command I frequently forget....

Some commands you just use too seldom. When you need them, you just thinking how you did it before... So I need a cheat sheet to note these down... 


Push to a remote branch (warning not tested)

git push . origin/<remotebranch>

Push one branch to another remote one (for example pushing it from the bleeding edge "trunk" to a staging area called "testing."

git push origin trunk:testing

explained: git push origin <from-branch>:<to-branch>

Afterwards, the branches are at  the same commit. 

Checkout tracked branches 

git checkout --track -b  <local> <remote>/<remotebranch>

e.g git checkout --track -b testing origin/testing

of -- to delete and recreate it -- 

git branch -f <local> origin/<remotebranch>

A Git workflow explained

This description is targeted for workgroups, but also works if you are alone on the project and  want to use feature-branches dedicated for some well feature...


Link: Clone all branches


Link: Best practive for commit messages


Link: Gitosis -- add a new repository


Link: Gitosis -- Git and Gitosis under windows (windows users as client)


Linux / Debian | Comments (0) | Trackbacks (0)

Related Articles:

0 Comments | "git cheat sheet" »