This is off the top of my head so hopefully someone can correct me if I've
made a mistake. Since you've merged the dij branch in with master, you
should already have the origin/dij remote branch. You need to create a
local tracking branch however to work on.
Verify that you have the remote branch by doing:
git branch -a
This will print all of your branches, local and remote (git branch -r is
just remote, and git branch is just local). You should see one in there
To get a local branch you should be able to do something like.
git checkout --track origin/dij
This will create a local branch named dij. You can again verify it is there
with the git branch command.
You should be able to use git reset (and possibly git reflog if you need it)
to restore master to the state it was at previously.
On Fri, Apr 17, 2009 at 10:20 AM, EricP <parent.eri...@gmail.com> wrote:
> My question might seem a little dumb and I beg your pardon for that. I
> thought it would be natural to do what I wanted but it did not give
> the expected results. Hence my question on this group...
> I develop code at home and in a lab. I've setup a reference repository
> on a secured server to allow for code share between my home and lab
> From the Lab, I have three branches: "master", "dij", "network". I
> push my work to the safe repository almost every day.
> At home, I have a repo with two branches so far: "master" and
> Yesterday, I wanted to pull the "dij" branch from the safe repo to my
> house. I am now thinking I did not issue the good command for
> retrieving the "dij" branch on my computer:
> $ git pull origin dij
> where "origin" is the name of my safe repo.
> My idea was to get the "dij" branch from origin attached to my actual
> HEAD, locally. I wanted to retrieve the whole branch "dij" from the
> "origin" repo to my home repo. What happened is it merged the dij/HEAD
> to my master/HEAD.
> Any idea of how this can be achieved, or even if this can be achieved
> at all?
> - Eric
You received this message because you are subscribed to the Google Groups "Git
for human beings" group.
To post to this group, send email to firstname.lastname@example.org
To unsubscribe from this group, send email to
For more options, visit this group at