Git best practices


just starting part 1 v3 and wondering if the community has settled on best practices for using git both for keeping up to date with Jeremy and Co’s master branch while also hacking away and version-controlling on personal versions of the notebook. It seems like @willismar and @jeremy together suggest something along these lines:

1 create private branch off of master for one’s own tinkering with course notebooks

git checkout -b <mybranch>

2 rename course notebooks for local tinkering under version control, prefixing “tmp” if you don’t care about version control

3 update master from the course repo and merge into private branch

git checkout master
git pull
git checkout <mybranch>
git merge master

Is this about right, or would you suggest improvements?



For those who want to backup their work or browse the notebooks statically you can push your branch (see Nick’s post) to GitHub:

First create a private repository in GitHub. (Is it allowed to be public yet?)

$ git checkout MYBRANCH
$ git remote add MB
$ git remote -v
MB (fetch)
MB (push)
origin (fetch)
origin (push)
$ git push MB MYBRANCH

Where MYBRANCH is your branch name (see original post) and MB a shortcut name for your branch remote url.
In short: you pull from master but merge, commit and push from your branch.