Chapter 34 Notes

Notes for future

34.1 Common workflow questions

34.1.1 Common predicaments and how to recover/avoid

34.1.2 Keep something out of Git

List it in .gitignore.

34.1.3 I didn’t mean to commit that

Committing things you didn’t mean to (too big, secret). How to undo.

34.2 git stuff

Git explainers, heavy on the diagrams

A Visual Git Reference

A successful Git branching model

A successful Git branching model considered harmful

Git Tutorials from Atlassian

Software Carpentry Git Novice Lesson

Michael Freeman slides on Git collaboration

GitHub Training materials

Git for Ages 4 and Up

Learn Git Branching

A Git Workflow Walkthrough Series

  • Part 1: Feature Branches
  • Part 2: Reviewing Pull Requests
  • Part 3: Reviewing Pull Requests Locally
  • Part 4: Merging Pull Requests

Git from the inside out

34.3 The repeated amend

A way to commit often, without exposing your WIP on GitHub or without creating a very cluttered history.

Make changes. Reach a decent stopping point. Test, check, if a package … Render if an analysis …. Nothing broken?

Commit. Don’t push.

Make more progress. Keep testing or checking or rendering. Inspect diffs to watch what’s changing.

Are things broken? Use an appropriate reset to fall back.

Are things improving? Commit but amend the previous commit.

Keep going like this until you’ve built up a commit you can be proud of.

Now push.

It is important to not push amended commits unless you really know what you’re doing and you can be quite sure that no one else has pulled your work.

34.4 Disaster recovery

Break it down:

  • Is something wrong with my filesystem/files?
  • Is my git repo messed up?
  • How can I keep this from happening again?

Rebase avoidance techniques.

Headless state. Rebase hell.

What to do when you can’t, e.g., switch branches. Stashing and WIP commits.

34.5 Engage with R source on GitHub



Being a useful useR

  • stay informed re: development
  • use issues for bug reports, feature requests
  • make pull requests

34.6 Workflow and psychology

Stress of working in the open

Workflows for group of 1, 2, 5, 10