/
GitHub: Creating a branch to trial your own changes

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.

Instructions

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

This…

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:

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

Related content

GitHub: Bring edits from another repository to your own
GitHub: Bring edits from another repository to your own
More like this
GitHub: Creating an up-to-date branch that tracks main repository
GitHub: Creating an up-to-date branch that tracks main repository
More like this
A Git guide
A Git guide
More like this
How to update your personal repository on Github
How to update your personal repository on Github
More like this
Finalize and push package to GitHub
Finalize and push package to GitHub
More like this
Setting up CI using your own Azure account
Setting up CI using your own Azure account
More like this

DataSHIELD Wiki by DataSHIELD is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License. Based on a work at http://www.datashield.ac.uk/wiki