Setting remote to a specific branch?

So I understand the value of branching, but one thing is confusing me. I have my local repo. I push changes to a remote, which has a post receive hook setup to write files on a website. So I create a branch (new-branch) to try out something. I edit files, commit, and push to the remote. Great. Problem is, while the repo on my remote is up to date, I guess it's still set to master,as the changes in new-branch aren't reflected on the site. How do I set the remote to a particular branch so that that branch is driving the post receive hook, and not just defaulting to the master branch? I would just merge on master but I'm not ready to as I'm still working out the kinks on the branch.

2 answers

While I can not answer your question specifically, I found that A Successful Git branching model written by Vincent Driessen an explanation on how to create a workflow that handled separate branches for developement and production code.

There are also some excellent tutorials on different workflows with git on the atlassion website as well.


Suggest an answer

Log in or Sign up to answer
Community showcase
Published Oct 23, 2018 in Sourcetree

Tip from the team: configure your repos for hosting goodness!

Supported Platforms macOS Windows We recently introduced support for additional hosting services such as GitHub Enterprise, GitLab (Cloud, Community Edition, Enterprise Edition), and...

1,118 views 4 2
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you