Show the current Git branch in your Bash prompt
Put the branch name beside your working directory using Git’s own prompt helper. The missing step: load git-prompt.sh before calling __git_ps1.
Loading...
Theory, judgment, design, and reflective notes about building software that survives contact with reality.
Page 3 of 3
Put the branch name beside your working directory using Git’s own prompt helper. The missing step: load git-prompt.sh before calling __git_ps1.
Let Git remind you about migration files when you switch branches. This updated recipe compares the commits passed to post-checkout and leaves database migration tracking to your framework.
A small, current Git setup: identity, default branch name, editor, credential helper, and a few aliases that make day-to-day work less noisy.
It is always pleasant to start a project from scratch, create its repository yourself, define the coding style accepted in it, and much else. But sometimes we inherit difficult children with a heavy past: mixed tabs and spaces, different line endings, and encodings.
In 2012, Opera refused to refresh my CAPTCHA image. Moving a random value from the URL fragment to the query string worked; the distinction still matters.
Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live — John F. Woods.