I've done something incredibily stupid. I figured I should ask before I tried to "fix" it and accidentally make things worse.
I tried to list all remote branches in my git repo:
git branch remote
Obviously this isn't the correct command. Instead of listing remote branches, I created a local branch called remote. I should have done:
git branch -r
Can I just remove this branch with:
git branch -d remote
Will this have any effect on my remote branches? I don't want to accidentally delete anything on the remote side.
Yes,
git branch -d remote
Take a look:
MYHOST:git wwheeler$ cd seiso/
MYHOST:seiso wwheeler$ git branch
* master
trunk
MYHOST:seiso wwheeler$ git branch remote
MYHOST:seiso wwheeler$ git branch
* master
remote
trunk
MYHOST:seiso wwheeler$ git branch -d remote
Deleted branch remote (was 15dc59f).
MYHOST:seiso wwheeler$ git branch
* master
trunk
MYHOST:seiso wwheeler$
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With