Git and Github
Git
From git home page:
Git is a free and open-source distributed version control system designed to handle everything from small to very large projects with speed and efficiency.
Git helps you:
manage the history of ALL your files related to a certain package (usually inside a single directory, which is called a repository). It adds the "save" and "rollback" bottom to your whole directory.
Together with Github, it backups your files online in a remote repository.
It allows multiple people to collaborate together. Indeed, most packages hosted on Github has dozens or even hundreds of contributors.
Github
While git controls your local file, Github is the remote host that allows you to upload your local repository into a Github repository. It's free!
Use git and Github
I do not want to explain git in detail, because there are tons of material introducing git and Github for beginners. Here are my suggestions to start:
Check your terminal, whether
git
is installed.Create a Github account. (This is mine)
Watch this 3min video from Github.
Read this neat introduction: https://rogerdudler.github.io/git-guide/
Once you understand basic git command (
git clone
,add
,commit
,push
,checkout
,merge
), you can use Github Desktop - GUI from Github for easier controlling.Clone or fork (in Github, fork means make a duplication of this repo to your Github) my Github repo for this book.
Clone Github Repository of This Book
To get all the data and jupyter notebooks for this book:
$ cd /To/The/Place/You/Want/To/Save/This/Repo/
$ git clone https://github.com/lhqing/py_genome_sci_book.git
$ cd py_genome_sci_book/data/
# This is the data directory
$ cd ../analysis/
# This is the analysis diretroy, will contain .ipynb files
# If you want to update this repository from github, go back to the repo dir
$ cd /To/The/Place/You/Want/To/Save/This/Repo/py_genome_sci_book
$ git pull
Last updated
Was this helpful?