Linked Questions

2 votes
1 answer
4k views

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 ...
Jeong Ho Nam's user avatar
2 votes
1 answer
2k views

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 ...
morgan prieur's user avatar
5 votes
1 answer
376 views

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 ...
a1337q's user avatar
  • 780
1 vote
1 answer
141 views

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 ...
ytu's user avatar
  • 1,840
0 votes
0 answers
43 views

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, ...
athos's user avatar
  • 6,517
156 votes
25 answers
90k views

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 ...
Jake A. Smith's user avatar
150 votes
9 answers
59k views

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 ...
Hugo's user avatar
  • 13.1k
93 votes
6 answers
43k views

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 ...
Alex's user avatar
  • 3,053
34 votes
4 answers
24k views

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 -> ...
Aly's user avatar
  • 16.3k
23 votes
5 answers
44k views

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. ...
vcmkrtchyan's user avatar
  • 2,626
19 votes
5 answers
21k views

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 .
Ashish Agarwal's user avatar
6 votes
1 answer
4k views

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: ...
Ernte1893's user avatar
  • 313
4 votes
3 answers
3k views

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 ...
Snowcrash's user avatar
  • 87.2k
5 votes
1 answer
2k views

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 ...
Hemant Tank's user avatar
  • 1,744
5 votes
2 answers
1k views

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-...
Ayberk Özgür's user avatar
2 votes
1 answer
752 views

I have moved an SVN repo to Git and probably due to a number of clonings, I'm now left with a bunch of branches that look like BranchA origin/BranchA remotes/BranchA remotes/origin/BranchA remotes/...
Makis's user avatar
  • 13.2k
0 votes
1 answer
1k views

I am trying to delete my remote branches. I have three of this kind remotes/origin/test But none of them can be deleted. I've searched for common solutions and I have found this suggestions: git ...
Kevin Katzke's user avatar
  • 3,791
0 votes
1 answer
1k views

My BitBucket repository does not show several branches but running git locally in bash: git fetch --all; git branch -a; does show those remote branches. When I try deleting them in git locally: git ...
VilleLipponen's user avatar
0 votes
1 answer
270 views

I delete the local and remote branch like this: git branch -D logout git push origin :logout but when I do: git-get-branches this is alias that I have in .zshrc: alias git-get-branches='git fetch; ...
The Outstanding Question Asker's user avatar
5 votes
2 answers
130 views

Usually, when I send Pull Requests on github, I would create a branch, make my changes, then ask them to merge that branch into their repo. Once that is done, on Github, I delete the branch (but ...
F21's user avatar
  • 33.6k
0 votes
1 answer
102 views

I know how to delete remote branches, so this question isn't: cleaning up old remote git branches or how to manage obsolete branches on github Rather, my problem is that deleting old feature branches ...
kayaker243's user avatar
  • 2,648
0 votes
1 answer
96 views

I usually fetch from a remote repo that I share with my team members. Then I merge their branches into my main branch and create new local branch to do development. Everything is going well EXCEPT ...
user1330974's user avatar
  • 2,626
-1 votes
1 answer
122 views

Should 'git fetch' retrieve the same metadata about remote branches in all instances? If I run ... git fetch git branch -r ... on several servers (environments) that have the same remote origin, ...
David.Woosley's user avatar
2 votes
1 answer
50 views

I have a project with a friend with only one branch, master. My friend last worked on the project and I fetched (git fetch) his work just to have a look. This created a branch called origin/master: ...
Ben's user avatar
  • 529
0 votes
0 answers
57 views

I have a git repo backed by a BitBucket instance. In this repo I appear to have three branches: main (my local branch I guess) origin/master origin/main The master naming scheme seems to be the ...
halloleo's user avatar
  • 10.8k