git应用
安装 Git for windows
git config --global user.name "zhangyue"
git config --global user.mail ***@*.com
查看本地分支:git branch
获取远程分支:git fetch origin develop
切换分支到develop:git checkout develop
提交代码到远程develop分支:git push -u origin develop
新建分支及删除分支
新建分支:git checkout -b featurenew
将分支featurenew提交到远程:git push -u origin featurenew
删除本地分支:git branch -d frontfeature
删除远程分支:git push origin --delete frontfeature
本地新建分支,修改后提交到远程,但不提交本地分支
新建分支:git checkout -b work1
切换到要提交到的分支:git checkout develop
获取最新:git pull origin develop
合并分支:git merge work1
推送到远程分支:git push origin develop
本地分支work1若不需要,可以删除:git branch -d work1
删除远程分支develop:git push origin :develop
远程分支合并,将develop合并到master
查看远程分支:git branch -a
切换到master分支:git checkout master
获取最新:git pull origin master
合并devlop到master:git merge develop
推送到远程:git push origin master