GitHub: Creating a branch to trial your own changes

The benefit of this is if you have multiple tasks to do on the code, it allows you to isolate the changes caused by each task. Then you can perform in parallel various tasks wihtout them interfering with each other/ not be pressured to finish tasks at risk of other parts of the project breaking.


Firstly must select the right branch that you want to work off.

Create a new offshoot branch in the dropdown.

Now in the Linux terminal:

git fetch --all


does what?

Now, need to switch local files to contain the new branch:

git checkout <name_of_new_branch>

Check to see that the contents of the new branch contain waht you expect them to:

git status

Finally you can check what difference there is with the master branch:

git diff -r upstream/<name_of_copied_branch>

If it has just been created, there will be no output (i.e. no differences).

DataSHIELD Wiki by DataSHIELD is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License. Based on a work at