How To: Git Submissions with SourceTree

Started by SleePy, December 13, 2015, 06:53:51 PM

Previous topic - Next topic


December 13, 2015, 06:53:51 PM Last Edit: September 27, 2020, 11:41:01 AM by SleePy
Heres a quick tutorial on how to do Git Submissions with
Our Git repository is at:

After navigating there you will need to fork the repository to your own profile.

Copy the HTTPS or SSH address into your clipboard.

In choose New Repository

For this we will clone from URL

Fill out the information

All work should be done in branches.  It makes it easier to work with additional separate commits.  You should have the master branch checked out when creating a new branch.

At this point you are safe to make changes.  You are working on your local branch.  When you are ready to make commits return to

Select all the files you wish to include in the commit, Setup your commit message and Choose Sign Off from the commit options (far as I can tell in SourceTree this option persists only from the same branch while running SourceTree and is reset easily).  Using the keyword "Fixes #1234" Causes the issue to be closed once the PR is approved.  Just using the reference causes a notice about a reference to the issue.

Now that you have committed you will want to push changes back up to your repository.  Choose Push and make sure to select your repository and working branch (avoid submitting changes to master).

Back on GitHub you will see a new button showing up on your repository.  Click the Compare & pull request button to start the process.

Make sure you have the proper branches selected.  Fill out your commit message.

Once you do that, the new issue is created under the SimpleDesk issues.  As you can see, if the PR is mergable and you have rights to the repository to make changes, a simple merge button exists.

Now your repository will not stay in sync with SimpleDesks without intervention.  As you can see from this example, it does not have the latest commits from the master SimpleDesk repository.

Make sure to change back to the default branch.  Choose Repository and Repository Settings.  The location of this may differ for the Windows edition of SourceTree

Click Add on Repository

Name it upstream (or anyname and use the url:

After adding it, fetch the new repository

Now pull changes down, make sure to bring it from the upstream's proper branch.  It will merge into your current working branch.

Now push changes back up to your (origin) repository and proper branch

At this point you are synced with the master repo.
Jeremy D — Spare-Developer