Links to GitHub best practice articles/blogs etc.
This document is a collection of links to advice and best practice for maintaining GitHub repositories. My intention is to have this as an open resource for students, etc. to refer to and update.
pylint
, pycodestyle
aka pep8
for Python; Shellcheck may be useful for bash
scripts)TravisCI
)Landscape.io
)codecov.io
)git-lfs
to store themgit pull
before you work; git push
when you’re donemaster
clean: use branches/forks for development, and pull requests to update master
git
!: http://ohshitgit.com/git
commit message: https://chris.beams.io/posts/git-commit/.gitconfig
aliasesalias.lol=log --graph --decorate --pretty=oneline --abbrev-commit
alias.lola=log --graph --decorate --pretty=oneline --abbrev-commit --all
alias.hist = log --graph --pretty=format:'%h %ad | %s%d [%an]' --date=short
git rm
! How do I avoid typing all those filenames in?git add -u
- this will recognise absent files as having been deleted, and add this to your staging areaissue_X
), issued a PR remotely, merged the PR, and deleted the issue_X
branch locally - but it’s still showing up in git branch -a
or git lola
!git remote prune origin
to get rid of stale local branches (more info in the manual here)I have certain mantras that I use to guide my programming. They generally revolve around this theme: “Thinking is hard, and I’m not very good at it; every block of code should be simple and obvious, because if it makes me think, I’ll probably screw it up and break something.” - Remy Porter