Skip to content

Instantly share code, notes, and snippets.

View maxlawton's full-sized avatar

Max Lawton maxlawton

View GitHub Profile
@maxlawton
maxlawton / .bash_prompt
Last active February 12, 2016 20:42
Bash Prompt with VC info
#!/usr/bin/env bash
############################################################################
#
# Bash prompt with host string, VC info, and current dir
#
# To use, copy this folder to ~/.bash_prompt and place the following
# snippet in your profile script (.bash_profile, .profile, etc.):
#
# if [ -f ~/.bash_prompt ]; then
@maxlawton
maxlawton / .gitconfig
Last active September 15, 2015 18:10
Git configuration
[alias]
a = add
aa = add -A
ad = add .
ap = add -p
unadd = reset HEAD
########
s = status -s
sd = status -s .
st = status
@maxlawton
maxlawton / gitconfig-redmine-log
Last active August 29, 2015 13:59
Pretty format for logging commits to redmine
[alias]
rl = log --reverse --pretty=redmine
rlo = log --reverse --pretty=redline
[pretty]
redmine = "format:| commit:%h | %ad | %ae |%n%n%s%n%n%b%n"
redline = "format:| commit:%h | %ad | %s |"
@maxlawton
maxlawton / prepare-commit-msg
Last active August 29, 2015 13:58
Git Hooks
#!/bin/sh
# `prepare-commit-msg`
#
# This hook prepends commit messages with a numerical tag when
# committing under numbered branches.
#
# For example:
#
# feature/8932-callout-links -> "[#8932] ..."