A demo repo for learning how to use git and github
This is a repo for testing out things in github. Here are a few useful resources for using github.
Github guides has a basic activity for working with repos, hello-world.
The guide above shows how to contribute to a repo using the github website. You probably also want to be able to edit and add files right from your own computer. First, you will want to install and set up git. Then, for working with the repo, you will either want to:
- Use Github Desktop.
- Use the command line. Here are a couple of resources for adding a new repository and adding a file to a repository using the command line. One user has also set up a cheat sheet of command line commands to use with github.
Github is great for collaborative projects because it allows multiple users to work on parts of the project at once, keeps track of all versions and changes made, and provides a useful system for comparing and merging different versions. Different teams use github slightly differently, so there are a variety of options, but for now our team will probably use the Feature Branch/branch-and-pull workflow.
The Github Guides' "Understanding the Github Flow" provides a basic walk-through of this workflow.
There are also some recommended best practices for collaborating on github; these make it easier to avoid complicated merges and to keep track of all the changes that have been made (among other things). Here are a few useful articles/sites on best practices:
- Minimum Viable Git Best Practices for Small Teams by Hartley Brody
- Using GitHub as a team. by Danny de Vries
- How to Write a Git Commit Message by Chris Beams
Software Carpentry is an organization that provides training on a variety of topics in computing for scientists with limited prior experience. They have a session on Version Control with Git that you can go through yourself. Their in-person trainings are also great, if you have an opportunity to attend one.
Karl Broman, the creator of several widely used packages for QTL analysis, has made a supposedly minimal tutorial, his git/github guide, that shows how to do a variety of tasks in github.
For later stages in the game, his page on Putting your R package on github may also be helpful.
RStudio has support for version control using github. To find out more, check out Nathan Stephens's article Using Version Control with RStudio.
The github user PurpleBooth has provided a very nice template for a README.
Appropos of nothing, I just found that github supports large file storage. If you want to add large data files to your repo, you should probably install this first.