Tips for effectively using GitHub for lab work¶
- Set your git config file to automatically rebase.
To push your local changes to the
master
branch of our lab repositories, you must rebase your local version of the branch, to apply any prior commits made by other lab members. To automatically rebase your local branch every time you pull changes from GitHub, run the following command in a terminal:
git config --global pull.rebase true
This command updates your git
configuration file to automatically rebase.
If you have trouble synchronizing changes between your local computer and GitHub, check this first!
- Set your git config file to automatically stash changes.
Sometimes you have changes to multiple notebook entry or analysis files, and you don't want to commit all of them at once.
If you automatically stash these changes during synchronization,
git
will ignore them, while updating any staged changes. To automatically stash uncommitted changes every time you pull from GitHub, run the following command in a terminal:
git config --global rebase.autoStash true
- Notifications. How to configure notifications from GitHub Link. Specifically, you can change your notification preferences at https://github.com/settings/notifications after logging in with your GitHub username.