1

This question has been asked a few times but i haven't found my specific use case: I do have a nas which has gitosis and serves as a git master. I have a laptop and a desktop, on the laptop I do have a branch sandbox which I want to share via the nas on to the desktop. I tried git

git push sandbox : sandbox (: sandbox being redundant) 

which failed. Checking out sandbox and doing

git push origin HEAD

reports:

* [new branch]      HEAD -> sandbox

Now on the desktop I do:

git remote show origin

and I see the new branch:

Remote branches:
master tracked
sandbox new (next fetch will store in remotes/origin)

That's promising so now I want to pull the remote branch sandbox into my workspace on the desktop with:

git fetch origin sandbox (in the master branch)

it logs:

 * branch            sandbox      -> FETCH_HEAD

but branch sandbox is not created when I show the branches. Is there something trivial i'm missing? I also tried pulling but that also does not work as expected. regards, Jeroen.

1 Answer 1

1

sandbox should be listed if you do a:

git branch --all

You need to checkout said remote branch to track it locally

git checkout --track origin/sandbox

Then a simple git branch would show that branch.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.