git:git_chectsheet
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionLast revisionBoth sides next revision | ||
git:git_chectsheet [2011/08/01 10:16] – deva | git:git_chectsheet [2012/08/01 12:48] – deva | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ======GIT CheatSheet====== | ||
+ | =====List current status (including changes) in repo===== | ||
+ | < | ||
+ | |||
====List files in repo==== | ====List files in repo==== | ||
< | < | ||
Line 5: | Line 9: | ||
< | < | ||
- | ====Undelete file==== | + | =====Undelete file===== |
< | < | ||
+ | |||
+ | ====Undelete all deleted files==== | ||
+ | < | ||
+ | |||
+ | =====Mark conflict as resolved===== | ||
+ | '' | ||
+ | < | ||
+ | |||
+ | =====Turn off pager===== | ||
+ | < | ||
+ | Run < | ||
+ | Alternatively set '' | ||
+ | |||
+ | =====Tags===== | ||
+ | ====Create==== | ||
+ | < | ||
+ | git tag -a v1.4 -m ' | ||
+ | </ | ||
+ | |||
+ | ====List==== | ||
+ | All: | ||
+ | < | ||
+ | git tag | ||
+ | </ | ||
+ | Or filtered: | ||
+ | < | ||
+ | git tag -l v1.* | ||
+ | </ | ||
+ | |||
+ | ====Show==== | ||
+ | < | ||
+ | git show v1.4 | ||
+ | </ | ||
+ | |||
+ | ====Push==== | ||
+ | By default, the ‘git push’ command will not transfer tags to remote servers. To do so, you have to explicitly add a –-tags to the ‘git push’ command. | ||
+ | |||
+ | =====Branches===== | ||
+ | ====List branches==== | ||
+ | < | ||
+ | git branch | ||
+ | </ | ||
+ | |||
+ | ====Switch to branch==== | ||
+ | < | ||
+ | git checkout [branchname] | ||
+ | </ | ||
+ | |||
+ | |||
+ | =====CVS 2 GIT===== | ||
+ | < | ||
+ | git cvsimport -k -i -d server:/ | ||
+ | </ | ||
+ | The resulting git_reponame directory now contains the .git folder which can be moved to a server location for shared access. | ||
+ | Run '' | ||
+ | |||
+ | =====Branching/ | ||
+ | From: http:// |