git以及sourcetree使用问题(三)

推送本地分支到远程

git push origin feature/friendsync:feature/friendsync

查看分支情况

$ git branch -vv
dev 7f205f0 [origin/dev] 热更脚本的输出问题
elite 3758e28 [origin/elite] 删除热榜及点赞操作
* feature/friendsync 029b8aa 好友信息改为实时更新
master 6ec32ea [origin/master] 生成代码的tostring有潜在问题

并没有跟踪远程分支,再使用

git branch --set-upstream-to origin/feature/friendsync

建立跟踪。

 

 

当然也可以在推送时加参数,一步完成:

git push --set-upstream origin feature/friendsync:feature/friendsync

 

posted @ 2019-08-21 15:42  gongziyiyi  阅读(272)  评论(0编辑  收藏  举报