Linked Questions

17 votes
3 answers
5k views

I want to delete some remote branches of my project repository. I've run the next command: git push origin :name_of_branch and when I list the remote branches with git branch -r the branch that I've ...
Airam's user avatar
  • 2,058
0 votes
1 answer
101 views

I decided to remove the upstream remote reference from my local repository, but git-branch keeps showing remotes/upstream/master. I pruned the references, but it keeps showing upstream. How do I clean ...
Brandt's user avatar
  • 5,729
0 votes
0 answers
51 views

I was trying to fetch open PR's by running this command but I've created refs that are completely invalid: git fetch origin '+refs/pull/*/merge:refs/remotes/$rem/open-pr/*' Now I can't delete them. ...
TomNash's user avatar
  • 3,327
0 votes
0 answers
23 views

I have a repo hosted in Github. The command git branch -a shows the following: * develop master remotes/origin/HEAD -> origin/master remotes/origin/develop remotes/origin/master remotes/...
Gabriel's user avatar
  • 43k
20362 votes
41 answers
13.2m views

Failed Attempts to Delete a Remote Branch: $ git branch -d remotes/origin/bugfix error: branch 'remotes/origin/bugfix' not found. $ git branch -d origin/bugfix error: branch 'origin/bugfix' not found....
2767 votes
52 answers
1.1m views

How do I delete branches which have already been merged? Can I delete them all at once, instead of deleting each branch one-by-one?
Nyambaa's user avatar
  • 42.5k
654 votes
8 answers
229k views

When I do git fetch origin and origin has a deleted branch, it doesn't seem to update it in my repository. When I do git branch -r it still shows origin/DELETED_BRANCH. How can I fix this?
Chris Muench's user avatar
  • 18.6k
505 votes
4 answers
473k views

My situation is this... someone working on the same repo has deleted a branch from his local & remote repo... Most people who have asked about this kind of problem on Stack Overflow, or other ...
gogogadgetinternet's user avatar
192 votes
12 answers
82k views

I want to have my local and remote repositories always in sync in terms of branches. After a Pull Request review on GitHub, I merge and remove my branch there (remote). How could I fetch this ...
sf89's user avatar
  • 5,258
7 votes
1 answer
4k views

I have uploaded (pushed the entire local branch) to the remote repo. I have merged it with master and deleted it in the remote repo (on github.com) Running git branch -a still shows it in the console:...
ERJAN's user avatar
  • 24.6k
4 votes
1 answer
4k views

I'm working in a git repository on multiple tracking branches, and by the end of the day I don't know if I pushed all my work in all branches. Is there a git command showing which branches are not ...
Phate01's user avatar
  • 1,857
4 votes
3 answers
2k views

I have seen many somewhat similar stackoverflow questions regarding this. I have tried many ways but am still stuck. I have a script like this: git fetch --prune for k in $(git branch --merged| ...
techguy2000's user avatar
  • 5,191
1 vote
1 answer
1k views

My home computer is behind a corporate VPN firewall and is not accessible from outside. I am trying to keep my github repo as identical as possible to my desktop's repo. I have the following hooks:...
xjq233p_1's user avatar
  • 8,102
1 vote
3 answers
516 views

I created a shared repo and then clone it into two folders (A and B). All in the same PC. Now there are two branches, master and v0. Folder A and B are now in branch v0. On A I deleted the v0 branch ...
lily's user avatar
  • 565
1 vote
1 answer
126 views

^ For example, you can see that after I run git br (alias for git branch) I no longer have the fix/add-themed-validation branch, I deleted it. However when I try to check out a different branch with ...
Leon Gaban's user avatar
  • 39.4k