Does git fetch operate on ALL branches or just the current branch?
I have a remote repo on github, and on my local machine I have a few different branches (so I can switch between the branches using "
git checkout master", "
git checkout branch2", etc.).
When I run the "
git fetch" command, I am never sure if it's fetching updates for ALL of those branches or ONLY the branch I'm currently working in (the one I most recently "checkout"'ed).
In other words, if I'm working in
branch2 and want merge in changes someone else made to
branch1, do I need to do:
git checkout branch1
git checkout branch2
git merge branch1
Or can I just do this:
git merge branch1
Possible Duplicate: Show just the current branch in Git I am moving my monotone DVCS to git. In my build setup I have qmake get the current revision and the current branch (because these are build o
I'd like to push my current branch (hp1) with git push and not git push origin hp1:team/hp1 The remote branch already exists. My local branches: develop master * hp1 git remote show origin tells me
I have machine1 with git repo client, which has branches master and fixes_v3. I have machine2 and no matter what combination of things I try it pulls a branch and names it fixes_v3 but has the content
I forked a repo from Github. On doing git remote -v it displays: origin https://github.com/myusername/moodle.git (fetch) origin https://github.com/myusername/moodle.git (push) upstream https://github.
Is there a shortcut to tell Git to push the current tracking branch to origin? Note: I know that I can change the default push behavior, but I am looking for an ad-hoc solution that does not change th
I have multiple branches setup for a project. Does a git pull do a pull/merge for my current branch or for all the branches?
I often rebase feature branches and then want to force push them to the server. git push --force origin feature-mongodb-support Is there any shortcut for git push --force origin <current branch>
I am using svn2git to migrate an SVN repository of the standard branch/tag/trunk structure to Git. Having followed the instructions set forth by svn2git, I was able to fetch all of the revisions from
Is there any way to push successfully built feature branches to another branch? I'd like to have something like that: Git repository (Gitorious/GitHub whatever). Branches: master (current project's c
When I am in my local repo and do git show <commit-SHA> it shows me the commit and its associated file changes. But git does a search across all branches in the repo, not just the branch I am c
I'd like to view the context of commits around a git branch: any nearby ancestors or descendants in my repo. This is easy with gitk if the branch is recent and appears at the top. It's tedious if the
Given a large Subversion repository with many branches, I want to start using git-svn by cloning trunk first and adding specific branches later. I saw at least three ways to do this, but are any of th
I have multiple branches, and I would like to merge remote changes into a branch that is not my current branch. For example: git merge remote/branch some-other-branch
When I check out a tracking branch in git, it tells me: Your branch is ahead of 'origin/foo' by 1 commit Is there a way to output this for all my branches that track a remote, eg: foo is ahead of '
I'm able to see my local and remote branches colored differently with the following configuration in my .gitconfig. [color branch] current = bold cyan local = normal remote = bold red In git branch
I use git to maintain multiple working copies of my code. The idea is that I can check out any branch, build and run it to see how the branch's feature x fits in with the current state of the code. G
I've set up tracking branches with the --track option, and when I do a git pull on master, it fetches all branches to origin/branchname but doesn't merge with the local tracking braches. This is extra
When fetching a single branch, git fetch includes any tags that point into the branch: When refspec stores the fetched result in remote-tracking branches, the tags that point at these branches are au
I have many git branches. How do I delete branches which have already been merged? Is there an easy way to delete them all instead of deleting them one by one?
Is there a git command that's equivalent to below, but doesn't require me typing the CURRENT_BRANCH part each time? git checkout <tree-ish> -B CURRENT_BRANCH For example, I'm on branch master a
I want to get the log of all branch in only the current tree. Long story Given the git history below: $ git log --all --decorate --oneline --graph * 3d0cb35 (HEAD, master) 4th commit | * a43b07c (bran
I have a git repo for my project which is loosely based on GitFlow. I have a master branch, development branch (where all the work gets done) and a release branch. My repo depends on a few submodules,
As an example assume you want to write a git alias, which shows the difference between the current branch and its origin partner. In the specific case of master it would look like the following: [alia
I started work on what I thought would be a minor bug fix on my master branch. However, it has spiraled out of control to the point where I wish I had created a separate branch to do the development i
I somehow ended up with a git configuration with the following in the [remote] section: fetch = +refs/heads/master:refs/remotes/origin/master This of course means that I would never ever see branches
So I'm in a shell and I do the following: git fetch --all --prune git reset --hard git branch And the following is listed *master branch a branch b On the remote, there are two branches. master and
So I have two branches on git: develop and release. I have been using the develop branch until now. I just made a commit to the develop branch which I want to be available in the release branch. How d
I am attempting an interactive rebase against my current branch. Ie, I have a commit that fixes a typo, that I'd like to make into a 'fixup' on top of another commit. Sometimes this works. Sometimes t
We have a script that actually does git fetch; git checkout origin/<branch> to deploy a certain feature. The reason why we do this is that we wan't to avoid local branches (it's a test server),
I cloned a repo, which contains about 5 branches. However, when I do git branch I only see one: $ git branch * master I know I can do git branch -a to see all the branches, but how would I pull all t
I can say this: git push --all origin and it will push all branches to origin. But if I do this: git pull --all origin then it doesn't pull all the branches from origin, it just returns an error: fa
I'm new to branching in git and I'm a bit confused by the behaviour on swithing branches. Following these steps: git init Initialized empty Git repository in /Users/mads/Desktop/testing/.git/ echo 'he
It's quite annoying to work in the wrong branch when using GIT(in TFS). Is there any way to configure Visual Studio to clearly display what branch that's currently active? Like put it in the title bar
I just recently created a branch in our subversion repository. Running git-svn does not see the branch for some reason. The only thing that I can think of is that the trunk is behind the branch becaus
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
EDIT: Workaround. Now we understand the issue, here is the solution: do git svn fetch -r REVISION:HEAD where REVISION is the number of the svn commit of the branch creation. I've been happy using git
I am working on a local git repository. There are two branches, master and feature_x. I want to push feature_x to the remote repo, but I do not want to push the changes on the master branch. Will a gi
I'm trying to get from my git repo all branches (git branches -a) that matches regex (grep xxx). Normally in command line I write this: git branch -a | grep xxx So I'm trying to do the same in .sh fi
I already managed to merge branches from multiple GIT repositories into a single new repository (using a combination of git filter-branch and git fetch/merge). But I cannot seem to merge the tag
Lets assume that I have a branch called A and I committed my changes 5 times, how can I get all the 5 hashes from branch A, git log its not helping because its from long time ago and I cant find it..
I set just a simple description for my local branch and now I'd like to see it. How one can see description for a branch set by issuing git branch --edit-description?
ok so apparently to create a new git branch on the remote repository we need: git push origin origin:refs/heads/sandbox git fetch origin git checkout --track -b sandbox origin/sandbox git pull Now if
I'm looking to have a branch in git that has 2 upstream branches, such that it pulls from both of them and pushes to one of them... here's the scenario: MY_BRANCH --> ORIGINAL_BRANCH MY_BRANCH --&
I have a really straightforward set of git commands that is resulting in some curious behavior: Show my current local branches, and see that I'm on release/beta1: $ git branch develop master * release
I want to find out all the patches that have been applied between two git branches. I tried the commands below, but that didn't work out for me. git diff 1.6..1.4 | grep -r -i --include *\.patch How
If there are some changes to a few files on master and I create a branch, is it possible for that branch to not include the currently edited files on master branch? Like a clean branch from the last c
git stash drop  does not seem to have a branch option. Source : http://git-scm.com/docs/git-stash Am guessing its a very obvious requirement to delete all stashes done on a specific branch, once tha
I have two branches. One is master, and the other one i myBranch and they look something like this: master | | myBranch | / | / |/ | I want to merge them into one branch, keeping all the changes from
I started working on my master branch thinking that my task would be easy. After a while I realised it would take more work and I want to do all this work in a new branch. So how can I create a new br
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 w