2

See image of cmder terminal with Fixes branch

Next to current directory it says (Fixes --> origin) but when I enter git branch command it does not show any git branches. How do I remove (Fixes --> origin) from showing next to the directory? Why is it showing that branch? This was a branch from a different project.

McCoder
  • 73
  • 1
  • 9

1 Answers1

2

Try instead:

git branch -avv

You will see your local branch Fixes associated to the remote repo named 'origin'

You can stop tracking the remote branch origin/Fixes with:

git branch --unset-upstream Fixes

Then, you won't see (Fixes --> origin) anymore, only (Fixes).

The OP McCoder actually finds (from the comments):

There was a .git directory in my C:\Users\Mel directory(so one level up).

I removed the directory and the Fixes branch finally disappeared!
I thought it deleted git from my entire system but I created a test dir and ran git init successfully.

Community
  • 1
  • 1
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • C:\Users\Mel\Desktop (Fixes -> origin) λ git branch --unset-upstream Fixes fatal: Branch 'Fixes' has no upstream information ======================================================================================================== I typed the above in my terminal. I want to completely remove both Fixes and Origin. My Desktop should not have a git Branch associated with it all. – McCoder Mar 17 '18 at 02:31
  • 1
    @McCoder The command was -avv, not -acc. Check for a .git folder in your current directory or in a parent directory. If you remove it (rename it to .foo, for testing), and Git information should disappear – VonC Mar 17 '18 at 02:46
  • There was a .git directory in my C:\Users\Mel directory(so one level up). I removed the directory and the Fixes branch finally disappeared! I thought it deleted git from my entire system but I created a test dir and ran git init successfully. What did you mean by rename it to .foo for testing? What test would I run after renaming the .git directory to .foo? – McCoder Mar 17 '18 at 04:04
  • @McCoder A .git folder include the full history of a repo. I suggested a rename only if you were interested in that history. If not, deleting it is fine. – VonC Mar 17 '18 at 07:54