Skip to content

Instantly share code, notes, and snippets.

@arthurattwell
Created February 22, 2017 12:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save arthurattwell/357bfa6b189bb30474609d908ea3d25d to your computer and use it in GitHub Desktop.
Save arthurattwell/357bfa6b189bb30474609d908ea3d25d to your computer and use it in GitHub Desktop.
Basic GitHub steps for editorial teams

This is a telegraphic overview of the steps for using Git in a non-technical (e.g. editorial) team. It assumes you're using GitHub to host your files (the 'origin'), and GitHub Desktop on your computer as your 'Git client'.

Overview

  1. Git takes snapshots of everything inside a given folder, which we call a repository or 'repo'.
  2. We call each snapshot a 'commit'. Git gives every commit a unique ID number, called a 'hash'.
  3. When working on a team, you make a copy of the original repo in your own GitHub account. Your copy is called a 'fork'.
  4. You take snapshots (commits) of your fork as you work, and sync them to GitHub.com.
  5. From time to time, you submit your changes to be included in the original repo. Technically, Git submits the difference ('diff') between your fork's latest commit and the latest commit on the original.

Create your own copy of a project (once-off per repository)

  1. On GitHub.com, 'Fork' to copy the repo to your own GitHub account.
  2. Then in GitHub Desktop, 'Clone' your fork to your machine.

Work on the files

  1. Before your do any work, in GitHub Desktop, click Sync.
  2. If the the 'Update from…' button becomes active (is not greyed out), click it to update your fork with the latest changes in the original repo.
  3. Do a piece of work.
  4. You must now take snapshots of your work by committing your changes.:
    1. In GitHub Desktop, in 'Uncommitted changes', tick the files you want to commit together, write a commit-message summary (and description if you like), and click 'Commit'.
    2. Repeat for each set of files you tick. This way you can group changes into commits that will make sense to others.
  5. Click 'Sync' to send those changes to GitHub.com.

Submit your changes to the original repository

  1. On GitHub.com, looking at your fork, click 'Create pull request'.
  2. Check that this pull request compares the correct original (the 'base', which is the latest commit on the original) with the correct fork (the 'head', which is the latest commit in your fork). By default this will be the case, unless you are using branches (which we have not covered here).
  3. Write a title and description for your pull request that describes your work clearly to the original repository owner.
  4. Click 'Create pull request'. This will send a notification to the original repo owner, who'll review your changes, and either accept them or ask for further changes.
  5. If you need to make further changes, you do these as before on your machine, and sync to GitHub.com. GitHub.com automatically adds those changes to your open pull request.

Next-level tricks to learn about in future

Using branches in your fork helps to organise your commits and pull requests. You can create new branches in GitHub Desktop before committing changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment