git cheat sheet
Posted by coldtobi | 7 Jan, 2010, 13:01A 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...
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
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:
- YAML Template Sets.
- La Fonera: A better way to enable RedBoot via Telnet / Ethernet (safely) [HowTo]
- CakePHP: Baking a Application in Minutes
- Bzr2Git -- make a git repositpry out of a bazaar one
- Sending a email notification when pusing to git (sourceforge)