Stefan Wyder & Heidi Tschanz-Lischer
The tutorial is heavily based on a Software Carpentry Course
- Introduction
- Setting Up Git
- Creating a Repository
- Tracking Changes
- Exploring History
- Ignoring Things
- Remotes in GitHub
- Collaborating
- Conflicts
- Open Science
- Licensing
- Hosting
Chapters 1-6 by Stefan (Intro Presentation)
Chapters 7-12 by Heidi (PDF Presentation | PDF Exercises)
Additional topics (Stefan)
- Non-code files (Images, PDFs, Office documents)
- Large files Link1 | Link2 | Video (2min)
- Documentation/Website hosting
- Commit best practices
In my opinion it is easier to learn git using the command line. After initial setup all we need for our daily work are 3 or 4 git commands - with time we learn and memorize more commands. By using graphical interfaces there is a higher risk of using advanced commands without really knowing what they do.
- Mac
Install Git from here: http://git-scm.com/downloads.
For older versions of OS X (10.5-10.7) use the most recent available installer available here. - Windows
Install Git for Windows by downloading and running the installer. This will provide you with both Git and Bash in the Git Bash program. - Linux
You can install it via your distribution's package manager. For Ubuntu runsudo apt-get install git
.
We recommend SourceTree (Mac, Windows), Github for Mac and, for Linux, GitKraken or SmartGit.
RStudio also comprises a basic git client.
Because all of the clients are just forming and executing Git commands on your behalf, you don’t have to pick one.
You can literally do one operation from the command line, do another from RStudio, and another from SourceTree, one after the other, and it just works.
For a full list of available graphical interfaces, see http://git-scm.com/downloads/guis
In case of installation problems, consult this site and this site.
Configure git the first time is used on a computer.
Tell Git your name so your commits will be properly labeled
git config --global user.name "YOUR NAME"
Tell Git the email address that will be associated with your Git commits.
git config --global user.email "YOUR EMAIL ADDRESS"
- https://help.github.com/
- https://help.github.com/articles/good-resources-for-learning-git-and-github/
- https://www.atlassian.com/git/
- Stackoverflow
Cheatsheets
Courses
- http://gitimmersion.com/
- Interactive learning git (15 minutes)
- Git - the simple guide
- Happy Git and GitHub for R useRs
- Interactive learning
- Software Carpentry Course
- Git book
Improving git skills
- https://github.com/GitInPractice/GitInPractice
- http://firstaidgit.io/#/
- http://thelinell.com/2014/12/23/curated-git-links-of-2014/
- http://41j.com/blog/2015/02/common-git-screwupsquestions-solutions/
How to undo (almost) anything with Git
Markdown
- Graphical diff/merge software, e.g. DiffMerge
- Github gives educational discounts to students, teachers, administrators, and researchers. Apply at https://education.github.com
- Git/GitHub in data analysis using R - nice practical paper
- Git in science
- Use GitHub safely without entering a password at each visit - generate SSH key and add to GitHub. Setup via command line or via SourceTree/Gitkraken