Version GitHub Docs

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.


References

Github for Course Organization

Using Github for Pull Requests

Collaboration using version control is widespread and important. However, it can be painful at times. Here are some code and links

Add upstream source

This example uses Data Carpentry protocols (such as gh-pages rather than main 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

Merge branch into main

git checkout main
git pull
git checkout branch
git merge main

Reset main

This is a DANGEROUS thing to do as it is irreversible. ALWAYS cache a copy before doing something like this.


This site uses Just the Docs, a documentation theme for Jekyll.