git:git_chectsheet
This is an old revision of the document!
Table of Contents
List current status (including changes) in repo
git status
List files in repo
git ls-files
List deleted files in repo
git ls-files -d
Undelete file
git checkout filename
Undelete all deleted files
git ls-files -d | xargs git checkout --
Mark conflict as resolved
filename
will have merge conflicts marked in the same way used in CVS.
git add filename
marks the conflict as resolved.
Turn off pager
git --no-pager [command]
Run
alias git='git --no-pager'
to disable it on all commands in the current shell.
Alternatively set core.pager =
in .gitconfig (it is set to the empty string.) to disable it entirely for that user.
Tags
Create
git tag -a v1.4 -m 'version 1.4'
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.
CVS 2 GIT
git cvsimport -k -i -d server:/path/to/CVSHOME -C reponame reponame
git/git_chectsheet.1317976022.txt.gz · Last modified: 2011/10/07 10:27 by deva