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

1 vote
Accepted answer

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
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,125 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