git 基本操作——上传文件与项目分支管理

创建并转入新分支:git checkout –b XX(其中XX代表分支名称)

将新分支发布在github上: git push origin Branch1

往分支中添加文件:git add master/XX(master中的XX文件)或者git add XX(XX文件)

添加文件注释:git commit –m “XX”

push:git push –u origin XX(之前的分支名称)

或push:git push

合并分支:先转入到master分支git checkout master

之后git merge XX (新建分支的名称)合并到master

推送:git push ;


在本地删除一个分支: git branch -d Branch1
在github远程端删除一个分支: git push origin :Branch1   (分支名前的冒号代表删除)

 

原文地址:https://www.cnblogs.com/this-xiaoming/p/5526328.html