你如何推一个Git分支(没有其他分支)?(How do you push just a single Git branch (and no other branches)?)

编程入门 行业动态 更新时间:2024-10-22 07:50:06
你如何推一个Git分支(没有其他分支)?(How do you push just a single Git branch (and no other branches)?)

我在一个本地git仓库工作。 有两个分支, master和feature_x 。

我想将feature_x推送到远程备份,但是我不想在master分支上推送更改。

将来自我的feature_x分支( feature_x分支已经存在于远程的)上的git push origin feature_x工作吗?

我不想在我的盒子上测试,因为我现在不能推动主人。

I am working on a local git repository. There are two branches, master and feature_x.

I want to push feature_x to the remote repo, but I do not want to push the changes on the master branch.

Will a git push origin feature_x from my feature_x branch (feature_x branch already exists on remote) work?

I do not want to test this on my box, because I cannot push to master right now.

最满意答案

是的,只是做以下

git checkout feature_x git push origin feature_x

yes, just do the following

git checkout feature_x git push origin feature_x

更多推荐

本文发布于:2023-08-05 06:23:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1428874.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:分支   push   Git   branches   branch

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!