How to get new branch updated with updates to old branch?

I have an existing Git repo; the latest branch is 1.10.1. I need to continue to maintain branches off 1.10.1 for bug fixes. However, I want to start on a new major function for the app, creating a new branch (2.0.0) for this purpose.

My question is, using SourctTree, how do I create a new repo (2.0.0) that will be constantly updated with the branches off of 1.10.1?

1 answer

1 accepted

You should not use a separate repo, but separate branches in the same repo. You will have to periodically merge/cherry-pick changes to your 1.10.1 hotfixes to your latest branch.

If your question is how to maintain working copies of both 2.0 and 1.10 at the same time, then you can clone one local repository into another, and have each one checked out to a different branch. The 2nd repo will need to push to the first, which will need to do another push to remotes, which is inconvenient, but I haven't found a better way to implement 2 working copies of the same repository.

Suggest an answer

Log in or Join to answer
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 ...

274 views 0 3
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
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot