git/github guide Karl's minimal tutorial
There are many resources for git and github; my aim is to provide the minimal guide to get started.
- Why git and github?
- Your first time: get github account; install git, set up ssh.
- Typical use: add, commit, push, status, and diff.
- Start a new repository: from scratch, or with an existing project.
- Contribute to someone’s repository: fork.
- Handling merge conflicts.
- Oops; that last commit message was wrong.
- Exploring the code and its history: tag, diff
- Branching and merging.
- Git/github with RStudio
- Other (much more thorough) resources.
I love git and github. I use both for keeping track of programming projects, papers, talks, and data analyses. And github has enabled me to contribute at least minor things to others’ projects, like the D phobos library and d3-tip.
I use git mostly from the command line on a Mac. I use the github site to explore others’ code, to indicate issues in their code, and suggest changes to their code.
I would like all of my statistical/computational collaborators to use git and github, so that we may collaborate more easily. But for statisticians with no history of use of version control, it can be hard to get started. This is a tutorial of sorts, to help.