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 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 ...

647 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