Thursday, 16 December 2010

Git cheatsheets

Git cheat sheets via Github

Check status of your repo: git status
Committing: git commit -m "First import
Update local : git pull

See what files have been committed: git ls-files
Remove file:git rm [filename]
Add file to next commit: git add [file name]
Commit all changes to repo: git commit -a
Commit plus message :git commit -m "Message"

View log of your commits: git log
View your commits + graph : git log --stat
Log with pagination: git log -v

Create new tag , push to remote branch:
git tag "v1.3"
git push --tags

Create new branch : git branch [name of your new branch]

Pull new branch from remote repo: git fetch origin [remote-branch]:[new-local-branch]

View branches: git branch

View list of all existing branches: git branch -a

No comments:

Post a Comment