$ git init
$ git add README.cmd
$ git clone
$ git status $ git status -s
$ git diff
$ git diff --staged
$ git diff --cached
$ git commit
Git automatically stage every file that is already tracked before doing the commit, letting you skip the git add part:
$ git commit -a
The git mv command is actaully doing multiple tasks in one command, it is not really renaming the file
$ git mv fileFrom fileTo
$ mv README.md README $ git rm fileFrom $ git add fileTo
$ git log $ git log -p -2 $ git log --stat $ git log --pretty=oneline $ git log --since=2.weeks
$ git commit --amend
$ git reset HEAD ...
$ git checkout -- ...
$ git remote $ git remote -v
$ git remote add
$ git remote rm
$ git fetch
Running git pull generally fetches data from the server you originally cloned from and automatically tries to merge it into the code youÎéÎ÷re currently working on
$ git pull
Generally itÎéÎ÷s better to simply use the fetch and merge commands explicitly as the magic of git pull can often be confusing.
$ git push
$ git remote show
$ git tag $ git tag -l
$ git tag -a -m
$ git show
$ git tag $ git tag v0.2-lw
$ git tag -a
$ git push
$ git checkout
$ git branch
$ git checkout
$ git checkout -b
$ git checkout master
$ git merge
$ git branch -d
$ git push --delete
To rebase a base branch with changes from a topic branch, or to replay commits on topic branch onto base branch
$ git checkout $ git checkout branch01
$ git rebase $ git rebase master
$ git rebase
In general the way to get the best of both worlds is to rebase local changes you've made but haven't shared yet before you push them in order to clean up your story, but never rebase anything you've pushed somewhere.
$ git branch --set-upstream-to /