| title | GitHub Version Control |
|---|---|
| author | Brian S. Yandell |
| date | 7/5/2017 |
| output | html_document |
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.
- Happy Git and GitHub for the useR
- Software Carpentry Version Control with Git
- Tools for Reproducible Research by Karl Broman
- How GitHub uses GitHub to Build GitHub
- ProGit Book by Scott Chacon and Ben Straub
- Getting Started With Git (UCSC Genome Browser)
- Good resources for learning git and github
- Git for humans
- BFG Repo Cleaner
- How to point a domain on Google Domains to GitHub pages
- Happy Git Classroom Overview
- GitHub Education Staff ([email protected])
- COMBEE Git Workshop
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
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.
- [https://git-scm.com/2011/07/11/reset.html]
- [http://stackoverflow.com/questions/4359681/want-to-change-my-master-to-an-older-commit-how-can-i-do-this]
- [https://github.com/Kunena/Kunena-Forum/wiki/Create-a-new-branch-with-git-and-manage-branches]
- [http://stackoverflow.com/questions/8085838/how-to-move-the-changes-from-one-branch-to-another-branch-git]