#git learn demo
- git init
- git add
fileOR.(mean all file) - git commit
- git status
- git diff
file - git log (--graph can see branch)
- git reset
HEAD^(^'s number mean how many version you reset) ORcommit id - git reflog (commed history)
- git checkout --
file(reset all change) - git reset HEAD
file(reset all chage afteradd) - git rm
file(delete file) - git remote add origin
address - git push -u origin master (the first push use
-u) - git clone
address - git checkout -b
dev(equal git branchdev;git checkoutdev) - git merge master (merge dev in master)
- git merge master --no-ff -m "commit content"
dev(merge forbid fast forward ) - git branch -d dev(delete dev branch use -D dev can delete unmerge branch)
- git stash (save this branch add version return to last commit)
- git stash list
- git stash pop (equals git stash apply ; git stash drop)
- git remote -v (show remote git address)
- git push origin master
- git pull