廖雪峰git教程常用命令


git常用命令:
 
 git config --global user.name "Your Name"
 git config --global user.email "[email protected]"
 
 mkdir learngit
 cd learngit
 pwd
 
 git init
 
 git add test.txt
 git commit -m "xx"

git checkout test.txt

git status git log

git reset --hard commit_id

git reflog

git remote add origin git@github.com:fzxblgong/learngit.git git push -u origin master git config --global core.autocrlf false git branch git branch <name> git checkout <name> git checkout -b <name> git merge <name> git merge --no-ff -m "merge with no-ff" dev git branch -d <name> git stash git stash list git stash pop/apply git remote -v git branch --set-upstream branch-name origin/branch-name git pull  git tag v0.1  git tag -d v0.1  git push origin v1.0 git config --global color.ui true --global参数是全局参数,也就是这些命令在这台电脑的所有Git仓库下都有用。






你可能感兴趣的:(廖雪峰git教程常用命令)