Linked Questions
25 questions linked to/from Cleaning up old remote git branches
2 votes
1 answer
4k views
How to remove remote branch only from my local git? [duplicate]
I know the command git push -d <remote> <branch_name> I want to delete remote branch only from my local git env. The command above removes remote branch from my local and remote github ...
2 votes
1 answer
2k views
How to delete a branch which is already deleted from remote [duplicate]
I work on a project with others developers, with a Github repo. We made a branch, then after the work with it has finished, we deleted the branch on Github. But on my local repo, I have again the ...
5 votes
1 answer
375 views
git showing branches that are not on github anymore [duplicate]
after running git fetch I can see some branches which are not (anymore) on GitHub (using git branch -a). Why is this? How can I resolve this? It's especially uncomfortable in git-cola, where I can ...
1 vote
1 answer
141 views
Delete local "remote branch" after the branch was deleted locally and remotely [duplicate]
This is not a duplicate of How do I delete a Git branch both locally and remotely?, and I've read Delete local “remote branch” without deleting remote branch? but get little help. There was a branch ...
0 votes
0 answers
42 views
Different git command prompts seeing different remote branches [duplicate]
For the same centralized git repository, I created 2 local repositories via git clone; after working for a while, I did git pull --all so by right the two local repositories are the same. However, ...
156 votes
25 answers
90k views
Delete multiple remote branches in git
I have a team member who inadvertently pushed over 150 of his local branches to our central repo. Thankfully, they all have the same prefix. Using that prefix, is there a git command or cool little ...
150 votes
9 answers
59k views
When deleting remote git branch "error: unable to push to unqualified destination"
I'm trying to delete a remote git branch with git push origin :my_remote_branch and getting: error: unable to push to unqualified destination: my_remote_branch The destination refspec neither ...
93 votes
6 answers
43k views
Remove old remote branches from Git
When I use bash autocompletion in Git, it keeps showing me branches of old remotes that I don't have anymore. When I do a git branch -la it shows those old remotes and branches while a git branch -l ...
34 votes
4 answers
24k views
How to delete a remote branch using Git?
I know this has been covered before, but I have tried the following and can't seem to delete the remote branch. aly@neon:~/workspace/3DOD_VARIANCE$ git branch -a * master remotes/origin/HEAD -> ...
23 votes
5 answers
44k views
How to clear git caches?
When I list my branches with git branch -a, git shows me remote branches I can't actually find on my remote(gitlab). I tried to checkout and track those branches, and to my big surprise, git did it. ...
19 votes
5 answers
21k views
How can I clean up my local branches if they are deleted from GIT repo
How can I delete all my local branches if they are deleted from GIT repo. Is there any command for that ? . I dont want to it one by one by the command git branch -D/-d branch-name .
6 votes
1 answer
4k views
A branch, deleted on gitlab, still exists in the command line?
After merging a development branch devBranchA into the master, I deleted it on the web interface (precisely, on gitlab.com). If I then do a git branch -r to list all remote branches, I get that: ...
4 votes
3 answers
3k views
git - delete local tracking
I've deleted some remote branches (dev/featureA and dev/featureB) however when I run git remote show origin I still see them being listed under the local branches section. E.g. $ git remote show ...
5 votes
1 answer
2k views
windows github tool - use branch unpublish or delete?
I'm new to Github and I've been using the windows github tool which has proved a great help and handled a lot of things like SSH keys, prompts commits, discard a commit, revert commit, and it has a ...
5 votes
2 answers
1k views
Old remote alias still visible in git logs and gitk, how to delete?
I recently renamed a remote to a new alias and the old alias (and all its commits up until the point of renaming) is still visible in the logs and consequently gitk. Running $ git remote show old-...