Skip to content

Latest commit

 

History

History
25 lines (19 loc) · 1.06 KB

git_exercises.md

File metadata and controls

25 lines (19 loc) · 1.06 KB

Basic Branching/Pull Request Exercise

  1. Clone this repo
  2. Make a few changes and commits on a new branch
  3. File pull request and ask for review/merge
  4. Sync remote changes onto local machine

Basic Forking Exercise

  1. Fork this repo
  2. Set up remote references on local (i.e., origin is your fork, upstream is central repository)
  3. Make a few changes and commits on a new branch
  4. File pull request from fork to central repo and ask for review/merge
  5. Sync changes onto local machine from central repo

A few common, trickier git maneuvers

Note: please work on a branch that is not master
Also note: even though it's fine to mess up this repo, still be careful using force push

  1. Update a pull request based on reviewer's feedback (either real or imaginary)
  2. Pull pre-existing branch from a central repository, make changes, and push to remote fork
  3. Squash two commits into a single commit and push changes to remote fork
  4. Amend a commit that's already been pushed to remote fork
  5. Remove a commit that's already been pushed to remote fork