Questions tagged [remote-branch]

142 questions
35
votes
3 answers

Refresh remote Git branches in Android studio

There is a new branch in the remote repository, but it does not appear in the git branches in android studio. How can I refresh that list to show the new branch? I have tried git branch -r but new branch is not showing in the list.
Firzan Shaikh
  • 515
  • 1
  • 6
  • 12
24
votes
1 answer

Git pull origin overwrites master?

I have a repository on Github, aav1 On my laptop I have two branches, one called master and one called vs12up The master branch was when the software was Visual Studio 2008, vs12up is converted to Visual Studio 2012. On my laptop everything seems…
Jeff
  • 1,609
  • 3
  • 20
  • 25
23
votes
5 answers

Error pushing changes on GIT. Ref names must follow git ref-format rules

I have one error using git on Sourcetree. I've created a local branch called sprints/Mycompany_sprint_1 (because I want it in a category) and then I did multiple cherry picks to this branch from another one. After that, I tried to push all the…
Inazense
  • 1,517
  • 3
  • 18
  • 28
23
votes
3 answers

How to remove remote origin/refs/heads/master

Don't ask me how but I managed to get accidentally the following remote branches in a git repository: $ git branch -r origin/HEAD -> origin/master origin/master origin/refs/heads/master All are pointing to the same commit. How can I remove…
Peter Smit
  • 27,696
  • 33
  • 111
  • 170
22
votes
3 answers

Why does Git tell me "Not currently on any branch" after I run "git checkout origin/"?

I was trying to follow the instructions from Git: "Not currently on any branch." Is there an easy way to get back on a branch, while keeping the changes? but git checkout appears to be broken: $ git checkout origin/web-zach HEAD is now at 1366cb1...…
hubatish
  • 5,070
  • 6
  • 35
  • 47
20
votes
2 answers

push from local branch to different remote branch

I have 2 branches named developer and Current on remote. In local I'm working on branch developer and I push my changes to remote developer. The question is, how can I push from local developer to remote Current? I have tried these: git push origin…
amiry jd
  • 27,021
  • 30
  • 116
  • 215
19
votes
5 answers

How to tell which remote svn branch is a local git branch tracking?

I'm a bit confused about how to commit on several svn branches from different local git branches. In particular, even though I've read many of the relates questions on this topic, there's one specific thing that nobody seems to have explained so…
UncleZeiv
  • 18,272
  • 7
  • 49
  • 77
19
votes
2 answers

Push a branch of a git repo to a new remote (github), hiding its history

My organisation is preparing to release an open-source version of our software using github, however I'm not sure the best way to approach this: We have two branches master and release, master contains some proprietary components that we have…
David Claridge
  • 6,159
  • 2
  • 27
  • 25
15
votes
2 answers

How to forcefully delete a remote branch in GitHub?

I have 2 remote branches : - pending-issues-in-project - new-issues-in-project I tried to delete pending-issues-in-project like this : git push origin :pending-issues-in-project, but i got the error : error: unable to push to unqualified…
Arpit Rawat
  • 1,817
  • 2
  • 20
  • 28
15
votes
2 answers

Configure a local branch for push to specific branch

Sorry if this question has been asked already. Am cloning from a repo named "git_lab" which has a branch named "test" When cloning i use "-b myname_test" to create a local branch named "myname_test" and local clone is named "myname_git_lab" When i…
Senthil A Kumar
  • 10,306
  • 15
  • 44
  • 55
15
votes
2 answers

git : how to specify a default remote push-to branch?

Suppose I have a tracking branch named 'abc' which tracks origin/master. When I'm on 'abc' and do a git push, it pushes 'abc' to 'abc'. How do I specify the remote push branch for it with just a 'git push'?
Shawn
  • 32,509
  • 17
  • 45
  • 74
11
votes
2 answers

fetch remote branch with the same name

I want to fetch a branch from a remote, but my branch name does not start with remote name, for example: git checkout -b BRANCH origin/BRANCH It work in some cases, but in some cases I get this error: fatal: git checkout: updating paths is…
saeedgnu
  • 4,110
  • 2
  • 31
  • 48
11
votes
2 answers

Create private branch on remote repository in git

I would like to build specific flow on our company git. developer create a branch on his local machine and commit there some files. dev push this branch to remote repo Other devs cannot access to this branch after few rounds off pushing dev decide…
Koziołek
  • 2,791
  • 1
  • 28
  • 48
11
votes
2 answers

GIT Rebase a Branch that is collaborated on?

After reading this article, it makes sense to rebase to gather changes from the main branch on to my feature branch: Git workflow and rebase vs merge questions clone the remote repo git checkout -b my_new_feature ..work and commit some stuff git…
Zhao Li
  • 4,936
  • 8
  • 33
  • 51
10
votes
4 answers

When is it safe to delete local branch?

The situation is like this: I created remote branch from other remote develop branch -> fetched it to local -> made some changes -> git add -> git commit -> pushed to remote and made pull request. Pull request is still there and branch hasn't been…
Phar0x
  • 147
  • 1
  • 11
1
2
3
9 10