Git Resources#

I recommend signing up for the GitHub Student Developer Pack.

Initial Setup#

If you have never used Git before, you need to configure your user identity. Run the following commands:

git config --global
git config --global "Your Name"

Git Interfaces#

  • Visual Studio Code has pretty good built-in Git support

  • Tower (avialable free with Student Pack)

  • GitKraken (available free with Student Pack)

  • You’ll probably need to learn at least a little command-line git at some point

Example .gitignore#

This is a good starting point for a .gitignore file for Python data science projects. Put its contents in a file called .gitignore in your repository.

# Ignore editor directories & files

# Ignore Python cache & output

# Ignore IPynb test dirs

# generic log and output files

# Python environments for CodeSpaces

Even if I have things like .DS_Store/ in my personal ignore file, I include them in the project, in case collaborators do not. Lines starting with # are comments.

Personal .gitignore#

If you want to create a personal ignore file that applies to all your projects, do the following:

  • Put your ignore rules in ~/.gitignore (a file called .gitignore in your home directory)

  • Modify ~/.gitconfig to include the following lines:

        excludesfile = ~/.gitignore