GitHub seems to be the best version control system. It was designed by Linus Torvalds to solve a problem of sharing ideas in the development of Linux (see TED interview with Linus Torvalds). While GitHub can be used for any type of documents, the RStudio
folks have made elegant and easy connections.
Collaboration using version control is widespread and important. However, it can be painful at times. Here are some code and links
This example uses Data Carpentry protocols (such as gh-pages
rather than master
for main page). Here upstream
is the source repository, origin
is your copy of the repository on GitHub, and gh-pages
is the local copy of the main branch of your repository.
Add the upstream
source; pull contents into gh-pages
; force the changes to be pushed to origin
.
git remote add upstream https://github.com/datacarpentry/OpenRefine-ecology-lesson.git
git remote -v
git pull upstream gh-pages
git push --force origin gh-pages
branch
into master
`git checkout master git pull git checkout branch git merge master
This is a DANGEROUS thing to do as it is irreversible. ALWAYS cache a copy before doing something like this.