29 Notes

Notes for future

29.1 Common workflow questions

29.1.1 Common predicaments and how to recover/avoid

https://twitter.com/JennyBryan/status/743457387730735104

29.1.2 Keep something out of Git

List it in .gitignore.

29.1.3 I didn’t mean to commit that

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

29.2 git stuff

Git explainers, heavy on the diagrams

https://twitter.com/JennyBryan/status/743548245645791232

A Visual Git Reference
http://marklodato.github.io/visual-git-guide/index-en.html

A successful Git branching model
http://nvie.com/posts/a-successful-git-branching-model/

A successful Git branching model considered harmful
https://barro.github.io/2016/02/a-succesful-git-branching-model-considered-harmful/

Git Tutorials from Atlassian https://www.atlassian.com/git/tutorials/

Software Carpentry Git Novice Lesson
http://swcarpentry.github.io/git-novice/

Michael Freeman slides on Git collaboration
http://slides.com/michaelfreeman/git-collaboration#/

GitHub Training materials
https://services.github.com/kit/

Git for Ages 4 and Up
https://www.youtube.com/watch?v=3m7BgIvC-uQ

Learn Git Branching
http://learngitbranching.js.org

A Git Workflow Walkthrough Series http://vallandingham.me/git-workflow.html

  • 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
https://codewords.recurse.com/issues/two/git-from-the-inside-out

29.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.

29.4 Disaster recovery

http://stackoverflow.com/questions?sort=votes

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.

29.5 Engage with R source on GitHub

Browsing

Searching

Being a useful useR

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

29.6 Workflow and psychology

Stress of working in the open

Workflows for group of 1, 2, 5, 10