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 http://nvie.com/posts/a-successful-git-branching-model/provided 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.

Graham

Suggest an answer

Log in or Sign up to answer
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Brian Ganninger
Published Jan 23, 2018 in Sourcetree

Tip from the team: workflow and keyboard shortcuts

Supported Platforms macOS Sourcetree has a lot to offer and, like many developer tools, finding and using it all can be a challenge, especially for a new user. Everyone might not love ...

649 views 0 4
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