命令行中的Git分支更改跟踪

时间:2016-09-13 07:58:13

标签: git

git工具:Tower

分支跟踪:origin enter image description here并在推荐行显示:enter image description here。接下来我更改了塔中的跟踪:origin-fock enter image description here。在推荐行中:enter image description here

如何使用git command ????

在命令行完成此操作

1 个答案:

答案 0 :(得分:2)

Without deleting anything, using git v1.8.0 or later:
git branch branch_name --set-upstream-to your_new_remote/branch_name

Or you can use the -u switch:
git branch branch_name -u your_new_remote/branch_name

Using git up to v1.7.12:
git branch --set-upstream branch_name your_new_remote/branch_name

摘自How do I change the remote a git branch is tracking?

同时检查  Make an existing Git branch track a remote branch?