Reputation: 129
I accidentally did:
git checkout mybranch
git branch --set-upstream origin mybranch
Git says:
Branch origin set up to track local branch mybranch.
How do I reset that and what could it do to me?
Thanks,
Upvotes: 2
Views: 985
Reputation: 2345
That means you just have a local branch that is set to be tracking the remote branch with the same name. No harm in having that, you are not forced to use the remote branch;)
You can remove the tracking link with
--no-track
or delete the remote branch:
git push origin :branch-name
For the latter, if you want to, you need to specifically remove the branch with the -d option.
Upvotes: 0
Reputation: 76256
If all else fails, just edit .git/config
with text editor. All the command does is set there
[branch "origin"]
merge=refs/heads/mybranch
so just remove the invalid setting.
Upvotes: 3