I_am_Vits
I_am_Vits

Reputation: 47

Deleting local branch named origin/xyz without deleting remote branch with same name xyz in Git?

I have 2 local branches named origin/QAD-1649 and QAD-1649, and a remote branch with same name QAD-1649. I want to delete the local branch named origin/QAD-1649 without deleting the remote branch so that I can continue working on the local branch QAD-1649 which should track remote branch origin/QAD-1649.

The local branch QAD-1649 currently tracks some another branch origin/compare which is in forked main project repository. I am trying to update it to origin/QAD-1649 in my main project repository. How can I achieve this without losing my remote branch QAD-1649?

Upvotes: 2

Views: 144

Answers (1)

Schwern
Schwern

Reputation: 164799

git branch -d only deletes local branches. So git branch -d origin/QAD-1649.

Upvotes: 3

Related Questions