Questions tagged [remote-branch]

142 questions
5
votes
2 answers

Git tracking branches

I have created a repository in local and pushed all the changes to the github. Later i have created a new branch("git branch v2") called "v2" and did some modification and pushed that branch to github as well. Later when i was executing the command…
5
votes
3 answers

How to show connections between local and remote branches in git?

I'd like to add a copy of a remote branch (origin/featureX) to my local repository. Therefore I generated a local branch featureX and set it to track the given remote branch: git branch featureX git branch -u origin/featureX featureX # Branch…
Edward
  • 4,453
  • 8
  • 44
  • 82
5
votes
2 answers

GIT: remove remote branches with no local tracking branch

Let's say that git branch -a outputs something like this: A B C *master remotes/origin/A remotes/origin/B remotes/origin/C remotes/origin/master remotes/origin/X remotes/origin/Y remotes/origin/Z In bold are those branches (X, Y, Z) that are in…
Mirek
  • 4,013
  • 2
  • 32
  • 47
5
votes
2 answers

How can I get remote git branches using Node.js?

I'm using this awesome library called Gift to do all of my standard git things (pulling, reading commits, etc). However, I can't seem to get the remote branches. I believe the git branch -r command will show me the branches, but the format is…
Shamoon
  • 41,293
  • 91
  • 306
  • 570
4
votes
2 answers

git add remote tracking branch to bare repo

I have a bare repo that was cloned from git.drupal.org. I have cloned from this bare repo to various different websites. From each of these, I push a site-specific branch onto the bare repo. E.g. if I have foo.org and bar.org, then my bare repo…
artfulrobot
  • 20,637
  • 11
  • 55
  • 81
4
votes
1 answer

Synchronizing local git forked repo branches with changes from remote original

I found a lot of q & a about synchronizing a forked git repository with the original remote repository but none applied to my exact problem. Let's assume I forked a project with a remote name of upstream, my fork's name is origin. I have a master…
emboss
  • 38,880
  • 7
  • 101
  • 108
4
votes
1 answer

How to delete the remote Git branch via the Command Palette(Ctrl+Shift+P) in Visual Studio Code?

I want to delete the remote branch in Visual Studio Code but it seems like it's not supported. GitLens supports Delete Branch (via Terminal) but I want to do it from the Command Palette. I tried finding the extension but couldn't find one. Can…
Thu San
  • 1,400
  • 1
  • 17
  • 29
4
votes
3 answers

Delete large number of branches from remote

I have a Git remote that has 1000 branches, and I want to delete all the branches whose name does not start with foo_. Is there an easy way to do that?
Ram Rachum
  • 84,019
  • 84
  • 236
  • 374
4
votes
2 answers

dotfile management for different machines with git branches reasonable?

I set myself up a dotfiles repo, hosted on a remote server and used on different machines. For some things I'd like to have individual configurations, e.g. the environment variables differ between machines. I thought, it would be nice to have an…
4
votes
3 answers

Doesn't show all remote branchs with git branch -r

when I execute the command: git branch -r, it's show just: origin/HEAD -> origin/master origin/development-elton origin/master And when execute the command: git remote show origin, it's show: remote origin Fetch URL:…
Elton Santos
  • 571
  • 6
  • 32
4
votes
1 answer

Disconnect local branch from remote one

I have two local branches A and B tracking the same remote branch C. I want to keep all the branches but I want to remove connection A -> C but keep the connection B -> C. how can i do that?
piotrek
  • 13,982
  • 13
  • 79
  • 165
4
votes
4 answers

Identifying a tag belongs to which branch in git

I first did repo sync to a manifest for a branch name myBranch. I then get the tags from git tag -l Now I want to know using git that each tag obtained as a result of git tag -l was actually created on which branch. Please note : I do not want…
iDev
  • 2,163
  • 10
  • 39
  • 64
3
votes
2 answers

SourceTree git "clone from url" gives me fatal error

I tried to add a new repository with the option "clone from url". It start the download but, almost immediately, it stops. I cannot see the old branches, it's like a new one. After some time, gives me this fatal error: 'git log' failed with code…
redYmir
  • 113
  • 5
3
votes
1 answer

What happens if I delete a remote branch that someone else is working on?

I have created a remote branch, that I now want to delete because it is merged back into our integration branch. I do a git push origin :name_of_branch to delete the remote branch. However, unfortunately I was mistaken and one of the other…
Bjarke Freund-Hansen
  • 28,728
  • 25
  • 92
  • 135
3
votes
4 answers

How can I convert all the remote branches in a local git repo into local tracking branches

How can I convert all the remote branches in a local git repo into local tracking branches, without one by one checking each one out. One reason why you might want to do this (the reason I want to do this) is so that you can take a clone of the…
GreenAsJade
  • 14,459
  • 11
  • 63
  • 98