(Optional) Recap

In a typical Git + GitHub workflow, you’ll have have your work in a folder (repository) on your local computer and also a linked copy on a remote repository (origin), in this case GitHub.

You can make changes in your local repository (most common) or your remote repository.

  • To synch the remote repository with local changes you Push.

  • To synch a local repository with remote changes you Pull.

© Copyright, Jessica Lord, BSD-2

Tracking changes

After you make changes to a file you will need to commit them so that Git creates a snapshot of the file at it’s current state (saving the file does not commit the changes to git). To this you:

  • Add the file to the staging area
  • Write an informative commit message
  • Commit the changes

GitKraken Client Interface

More info on GitKraken Client Interface basics

So far, we’ve learnt how to create repositories, commit files, and push/pull the files to a remote source like GitHub.

Here we’ll practice collaborating with someone else.

Forking, cloning, and pull requests

If your code is online on GitHub and has an open licence, anyone can fork to make a separate copy of your repository, clone their fork to create a local copy on their computer it and work on it.

Once they have made changes and pushed them to their own fork, they can then submit their changes to your repository by making a pull request

© Copyright, Jessica Lord, BSD-2

Let’s explore forking, cloning and making pull requests to a GitHub repository through a fun collaborative exercise!