-
-
Save temberature/1a7dc4aa66eb805ae989 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git init | |
git add | |
git commit -m "" | |
git status | |
git log --pretty=oneline | |
git reset --hard HEAD^//回到上个版本的状态 | |
git reset --hard 2434// | |
git reflog //记录 | |
git diff HEAD readme.txt | |
git checkout readme.txt // 没有暂存,回到版本;暂存,回到暂存 | |
git checkout HEAD readme.txt //撤销暂存 | |
git remote add origin | |
origin //远程库 | |
git push -u orgin master | |
git push origin master | |
“Git鼓励大量使用分支: | |
查看分支:git branch | |
创建分支:git branch name | |
切换分支:git checkout name | |
创建+切换分支:git checkout -b name | |
合并某分支到当前分支:git merge name | |
删除分支:git branch -d name” | |
Excerpt From: lv. “Git-Tutorial.” iBooks. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment