Gabriel,

 

                If my memory is correct when you are on your local test
branch if you do git push origin that will update the remote copy of test
with the contents of your local repository. I personally all ways add the
branch that I want to push just to make sure that the correct branch is
updated. So in your case the cmd line would look like git push origin test
If you have changed the default remote name of your repository you will need
to replace origin with the name you specified. Also on the remote end if you
want to have test as the default branch you would need to perform a git
checkout test NOTE: this will only work in a non-bare repository. If you are
not sure if the remote repository is configured as bare or not the easiest
way to tell I think especially if you have access to the server is to do a
directory listing where the repository is stored. I.E. if your repository is
in /var/www/git/yourproject and you see the project files when you list the
directory then the repository is non-bare and the above checkout command
will work.

 

From: git-users@googlegroups.com [mailto:git-users@googlegroups.com] On
Behalf Of Gabriel Lau
Sent: Sunday, August 19, 2012 3:42 PM
To: git-users@googlegroups.com
Subject: Re: [git-users] Re: Checkout a remote branch

 

Hello Thomas, thanks for the reply.

I found the site very interesting, explained quite a lot about the
functioning of git, but I found nothing about my problem.

 

To further clarify

In my case, I have two local branches: master and test.

I want to set the test as the main branch of my remote repository to view
the changes on the production server and when everything is ok, could go
back to the master branch and decide what to do next.

 

All I could find so far is related to locally manipulate the branches and
then only send the main(master). Nothing speaks about having two remote
branches and switch between them in the server.

 

Thanks anyway for the help

-- 
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 git-users@googlegroups.com.
To unsubscribe from this group, send email to
git-users+unsubscr...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/git-users?hl=en.

-- 
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 git-users@googlegroups.com.
To unsubscribe from this group, send email to 
git-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/git-users?hl=en.

Reply via email to