forked from hadley/r-pkgs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
git.rmd
40 lines (26 loc) · 1.48 KB
/
git.rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
---
title: Git and github
layout: default
output: bookdown::html_chapter
---
# Git and github
It is possible to use tools other than git and websites other than github. However, the majority of the R community uses git and github, and I think it's the friendliest system for new developers.
## Git
Using a source code control system, like git, is highly recommended because it makes it easy to:
* incorporate contributions from multiple developers working on the code at
the same time
* rewind time to undo mistakes or see what has changed between working code and broken code
In this document, I'll describe the use of git and github because they are the tools that I am most familiar with. There are many others (like subversion, mercurial and bazaar) that offer similar capabilities - the choice of git is somewhat arbitrary but the skills will readily transfer to other systems.
I'll just give you the basics, and give pointers to places where you can learn more advanced techniques.
http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html
### The basics
* `git init`
* `git add`
* `git commit`
* `git push`
* `git pull --rebase`
## Github
* makes it easy for others to send in patches
* ticketing system for tracking bugs
* RSS feed of changes, and line-by-line comments are very useful for working with collaborators
Additionally github gives you free hosting for public repositories. You only have to pay if you want private repositories with private collaborators.