« 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... 

_ASIP_

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...

http://reinh.com/blog/2009/03/02/a-git-workflow-for-agile-teams.html

Link: Clone all branches

 http://stackoverflow.com/questions/67699/how-do-i-clone-all-remote-branches-with-git

Link: Best practive for commit messages

http://www.tpope.net/node/106

Link: Gitosis -- add a new repository

http://bogdan.org.ua/2009/02/20/gitosis-how-to-add-new-repository.html

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

http://blog.dmbcllc.com/2010/04/22/git-gitosis-putty-and-windows/

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

Related Articles:

0 Comments | "git cheat sheet" »

Add comment

Add comment
 

 This is the ReCaptcha Plugin for Lifetype

Due to German legislation, all comments are moderated. If you get NO error message, your comment is accepted by the system and will be released at the earliest opportunity. Sorry for the inconvenience this might cause.

Inappropiate comments might be edited or not accepted.