
Git branch XXX (new a branch)
Git checkout XXX (switch to XXX branch)
Git pull origin XXX (pull from remote to local)
Git pull —rebase origin XXX (move head to the newest)
git revert xxx(版本号)
git commit -a (check all changes including delete)
删除remote文件夹
git rm -r xxx (删除本地rep)
git commit -m “remove”
git push origin master
删除branch
Git branch -D
Git merge another_branch
Git stash (隐藏修改的代码)
Git rebase -i
Git commit —amend —author=“name
Git reset —keep [email protected]{1} 回滚到上一个pull
Git log 看历史记录
Git show
解决冲突:
Git stash
Git reset HEAD~2 (有几次commit reset几次)
(git reset –hard master)
Git pull —rebase
Git stash pop
(解决本地冲突)
Git add *
Git commit -m
Git push
.gitignore (put files name u want ignore for push inside)
删除文件stage
git add -u
(automatically stage tracked files – including deleting the previously tracked files.)
git commit -m “delete files”




近期评论