We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
使用git很长时间了,对此做一个git常用操作总结
git init
git init [project]
git clone [url]
git config --list
git config [--global] user.name "[name]"
git config [--global] user.email "[email address]"
git add [file]
git add [dir]
git add .
git rm [file]
git commit -m [message]
git commit [file] -m [message]
git branch
git branch -r
git branch -a
git branch [branch]
git checkout -b [branch]
git checkout master
git branch -d [branch]
push origin --delete [branch]
git branch -dr [remote/branch]
git merge [branch]
git pull
git push
git push origin [branch]
git remote add origin [远程仓库地址]
git push -u origin master
git checkout [file]
git checkout .
git reset --hard
git status
git log
git diff
以上主要是总结git常用的操作,更多git操作请看git
The text was updated successfully, but these errors were encountered:
No branches or pull requests
仓库
git init
git init [project]
git clone [url]
配置
git config --list
git config [--global] user.name "[name]"
git config [--global] user.email "[email address]"
文件操作
git add [file]
git add [dir]
git add .
git rm [file]
代码提交
git commit -m [message]
git commit [file] -m [message]
分支
git branch
git branch -r
git branch -a
git branch [branch]
git checkout -b [branch]
git checkout master
git branch -d [branch]
push origin --delete [branch]
git branch -dr [remote/branch]
git merge [branch]
更新与合并
git pull
git push
git push origin [branch]
git remote add origin [远程仓库地址]
git push -u origin master
撤销
git checkout [file]
git checkout .
git reset --hard
查看信息
git status
git log
git diff
The text was updated successfully, but these errors were encountered: