目录
1、拉取远程分支到本地
![](https://img-blog.csdnimg.cn/0856b73e52024b678e95266838970a1e.png)
2、添加一个.cpp文件
查看仓库状态
![](https://img-blog.csdnimg.cn/6aec9e1d7c484c47ac318c5a66dd1536.png)
提交到本地分支
git add .
git commit -m "提交main.cpp"
![](https://img-blog.csdnimg.cn/4814ac552f0c47b69dcf397c9d06e1d8.png)
推送到远程分支
git push origin feature/add:feature/add
![](https://img-blog.csdnimg.cn/2718203cd2d74d7dbf88eae9ee1aca9a.png)
3、feature/add分支合并到develop
删除分支
然后远程分支如下:
然后在新建一个分支:
4、同步更新本地分支
![](https://img-blog.csdnimg.cn/ff7a34ed536d4a0bbabb5d9d6f5bbad5.png)
查看远程分支
git remote show origin
git remote prune origin
![](https://img-blog.csdnimg.cn/851ba3cdc87f4cbba7b382868a9ba046.png)
更新远程分支
git remote update origin -p