标签: git git-bash git-commands
我的代码在团队git repo的一个分支中。 现在我需要将它“转移”(即推送)到团队成员正在使用的同一个仓库的另一个分支中。我怎么能这样做?
我更喜欢使用git bash。
P.S - 我必须转移的新分支不是“master”。
答案 0 :(得分:8)
转到目标分支(git checkout target)并合并代码分支(git merge code-having)。然后,如果需要,将更新的目标分支推送到其远程。
git checkout target
git merge code-having