Questions tagged [remote-branch]
133 questions
1
vote
1 answer
Git - Change tracking configuration of branches
I have the following branches (local and remote):
origin/master
origin/alter
origin/alter_old
master
alter
alter_old
If I do git branch -vv I get:
master 6aec3b5 [origin/master] blam
alter 8c32a03 blaa1
alter_old 1669af7 [origin/alter:…
![](../../users/profiles/638366.webp)
Nordico
- 1,022
- 2
- 11
- 24
1
vote
1 answer
git - find unmerged branches without local repository
I love the git branch --no-merged command for finding branches that have changes that are not merged into the current branch.
Is it possible to do that without having a local copy of the repository?
With subversion, you could do this:
svn mergeinfo…
![](../../users/profiles/1451812.webp)
Larry
- 240
- 1
- 8
1
vote
1 answer
git create branch with untracked files
I've a master branch with a .gitignore file with directory X listed in it. (X is not being tracked).
When I try to add a branch tracking a remote using the command
git checkout -b mybranch origin/mybranch
The remote branch is tracking X directory,…
![](../../users/profiles/234542.webp)
Surya
- 969
- 1
- 9
- 27
1
vote
1 answer
Using Git, I have cloned a branch and would like to update to another remote branch
I have cloned a project from Github from branch, say, br1
git clone --branch br1 https://www.github.com/project/project /opt/project/
I would like to switch to branch br2 as if I had did this from the beginning:
git clone --branch br2…
![](../../users/profiles/1344633.webp)
lalebarde
- 1,279
- 1
- 14
- 33
1
vote
1 answer
Remove all local closed branch depends on its remote status
I would like to check which of my local branch are closed on remote server and remove them from my local list - is there such git (or any other e.g.bash) command?
My current flow:
git branch to list my local branches
log in to…
![](../../users/profiles/1004946.webp)
lukaszkups
- 4,855
- 8
- 41
- 73
1
vote
3 answers
Git rebase: reapply all commits, why?
We have a situation since we are using remote branches with Git.
Let me explain briefly:
Developer John created a remote branch "post_video"
I checked out this remote branch to work on it too
git checkout feature/post_video
I committed my changes…
![](../../users/profiles/1856816.webp)
Aurelien
- 277
- 2
- 8
1
vote
1 answer
Can Git Remotes be Cascaded?
My Windows Computer: Has a local git repository (R1) for a Visual Studio project. The remote (origin) for this repository is GitHub. They are identical with just a Master branch. (All of the commits have been pushed to GitHub.)
NAS (local y: drive):…
![](../../users/profiles/3620783.webp)
Jon
- 29
- 6
1
vote
2 answers
git remote tracking branch pushes new branch
I'm having trouble understanding what I did wrong when pushing to a remote branch. Here is what I did:
I created a remote tracking branch locally named CP_Server_Release using the SourceTree GUI tool. This branch is set up to track the remote…
![](../../users/profiles/1165843.webp)
moliveira
- 764
- 8
- 16
1
vote
1 answer
Bitbucket/Mercurial: Trouble pushing named branch (after closing earlier branch with same name)
I'm trying to push a changeset that contains a named branch to a Mercurial repository hosted on Bitbucket, and I'm getting the push creates a new remote head (did you forget to merge?) error. This is happening regardless of whether or not I specify…
![](../../users/profiles/1337498.webp)
Hephaestus
- 1,742
- 3
- 23
- 33
1
vote
2 answers
Git: what exactly causes remote branches to update?
According to Pro Git (3.5):
[remote branches are] local branches that you can’t move; they’re moved
automatically whenever you do any network communication.
However, this doesn't seem to be correct in practise. I've arrived at a situation…
![](../../users/profiles/2488778.webp)
Spalteer
- 444
- 4
- 11
1
vote
3 answers
Error in git book or I misunderstood?
Here you can read:
Tracking Branches Checking out a local branch from a remote branch
automatically creates what is called a tracking branch. Tracking
branches are local branches that have a direct relationship to a
remote branch. If you’re…
user1785721
1
vote
1 answer
git - swap/exchange a remote branch
I have two remote branches:
feature233
v1.9.12.
I need to rename the 1. branch to v1.9.12 and the 2. branch to v1.9.15 :
feature233 --> v1.9.12
v1.9.12 --> v1.9.15
Since the new name of the 1. branch is the same as the old name of the 2.…
![](../../users/profiles/1603090.webp)
Alicia R.
- 53
- 1
- 5
1
vote
1 answer
Git : Do not allow users to push a new branch to remote repo
Sometimes by mistake some of users tend to push their local branches to a remote repo creating a new branch on the remote repo. How can we disallow the users to create new branches on a remote repo but still allow them to push changes to the…
![](../../users/profiles/1924196.webp)
Smit Shah
- 13
- 2
1
vote
1 answer
Strange remote branch in git
The git branch -a command gives me following output:
master
stable
remotes/origin/master
remotes/origin/restoring_entered_information_from_post
remotes/origin/stable
but there is no such a branch restoring_entered_information_from_post on Github, I…
![](../../users/profiles/999355.webp)
Paul
- 23,702
- 36
- 106
- 215
1
vote
2 answers
Set remote branch to a commit we don't have locally
Some intern did a force push on master yesterday. After we've done scolding, ;) we looked at the result. Luckily, we had an almost up to date version of the master on one machine, only some pull requests have to be merged again.
But one thing is…
![](../../users/profiles/362378.webp)
iGEL
- 13,729
- 9
- 53
- 65