- Using GitHub
- Downloading GitHub Desktop
- Getting Started
- GitHub Terminology
- Example Workflow
- Learning Resources
- Some tasks can be performed on https://github.com/ :
- Can be useful for adding files directly to a repository
Pull requests
(more below)- Create/open
issues
- Editing code directly
- Download GitHub Desktop: https://desktop.github.com/
- Install locally on your computer or via Remote Desktop through Horizon
- Note: Conducting analyses requires the J:/ Drive. Therefore, this will typically require GitHub to be installed via Remote Desktop through Horizon
- Login using your account information from GitHub.com
- Your repositories should now be visible
- Highlight the repository you're going to work on and click 'Clone'
- Specify a path where you want this repository to be stored on your computer
- This will copy the current contents of the repository to your computer
Clone
a repository to your computer- Create a
branch
to work on your code Commit
changes you make on yourbranch
andpush
these to Github- If files are updated you can
pull
to get the most up-to-date files - Once finalised you can open a
pull request
- Finally you
merge
your changes to theMaster branch
and delete thebranch
- Clone
- Copies a
repository
locally to your computer
- Copies a
- Master branch
- Where the finalised and up to date files are stored
- Branch/brancing:
- Create a
branch
off theMaster branch
to work on prototype code
- Create a
- Commit:
- You can
commit
(save) to theMaster branch
directly (not recommended when iterating code) - Save changes you make to your
branch
(useful to have sensible commit messages)
- You can
- Pull Request:
- When you are happy with the code you've worked on in your
branch
you can have it reviewed against theMaster branch
- You can nominate collaborators as reviewers and they can comment changes or directly provide suggested edits for your code
- These can be run iteratively to develop a finalised version
- When you are happy with the code you've worked on in your
- Merge your pull request:
- This now synchronises your
branch
with theMaster branch
- You can then delete the
branch
, since its changes have been incorporated
- This now synchronises your
- Push:
- A
push
will sync changes made locally to the relevant branches on Github.com
- A
- Pull:
- A
pull
will download updates to this repository (made by others) from Github.com
- A