github常用命令

全局配置

git config --global user.name "lewiscutey"
git config --global user.email "[email protected]"
git config --global push.default simple

clone一个已有的仓库做开发

git clone https://github.com/lewiscutey/JD.git
git --help
git status
git add *
git status
git commit -m 'test cli'
git push

管理分支

git branch gh-pages
git checkout gh-pages
git merge master
git push --set-upstream origin gh-pages

常用命令

git branch      // 查看本地分支
git branch -a // 查看远程分支
git checkout . // 撤销本地所有更改
git branch -d <branch_name> // 删除其他分支
git branch -D <branch_name> // 删除正在开发的分支

猜你喜欢

转载自www.cnblogs.com/lewiscutey/p/8909117.html