Create and push a branch to the remote repository (Mercurial)

Whenever you start on a new feature, you may want to create a branch. Branching offers a way to work on a line of development that is different from the main branch. 

  1. From SourceTree, click the Branch button.
  2. From the Create a new branch field, enter a name for your branch.

  3. Click OK.
  4. You're now on your new branch. Make any updates to the repository that you want to make to your branch.
  5. Open the History view in Sourcetree and notice that your repository now has uncommitted changes.

  6. Click the Commit button at the top to commit the file.
  7. In the message box, enter a commit message.
  8. Click the Commit button under the box. From the Sourcetree History view, you'll see that the file has been updated on your new branch.

  9. Click the Push button to push your committed changes.

  10. From the dialog box that appears, click the OK button to push changes to your local repository.

Last modified on Sep 27, 2018

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.