git:git_chectsheet
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revision | |||
git:git_chectsheet [2012/08/01 12:48] – deva | git:git_chectsheet [2012/08/01 12:48] (current) – removed deva | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ======GIT CheatSheet====== | ||
- | =====List current status (including changes) in repo===== | ||
- | < | ||
- | ====List files in repo==== | ||
- | < | ||
- | |||
- | ====List deleted files in repo==== | ||
- | < | ||
- | |||
- | =====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:// |
git/git_chectsheet.1343818129.txt.gz · Last modified: 2012/08/01 12:48 by deva