Git - cogcommscience-lab/lab-docs GitHub Wiki
How to Use Git and GitHub
A detailed explanation of how to use Git and GitHub for scientific research is far beyond the scope of this Wiki. But there are great resources available.
As a first step, read this excellent introduction from Blischak, Davenport, & Wilsom, 2016. Be sure to do the excises!
Helpful Git features
.gitignore
Do not include temporary files (e.g., from a text editor) in a Git repo. Also, if you are a macOS user, do not include files
like .DS_Store
. Looking for a .gitignore
template? Then see here. You can even
create global .gitignore
files, I'm looking at you .DS_store
, see
here.
Be SURE to add large data e.g., .dcm
and .nii.gz
files to .gitignore
.
Commit Messages
Commits are the backbone of our lab's software versioning. Your messages must be helpful, and explain what the change did. Do not revise the commit history, and do not submit commits without a message.
Other Helpful Tips
Check out this great guide one of the 2018 Neurohackacademy members made. You'll want to set up ssh for GitHub, which will make your life MUCH easier. After you set up SSH, be sure to switch any remote repos FROM https TO ssh.