Code tagged with git
export MANPATH=/opt/local/share/man:$MANPATH
alias g=’git’
alias gb=’git branch’
alias gba=’git branch -a’
alias gc=’git commit -v’
alias gca=’git commit -v -a’
alias gd=’git diff | mate’
alias gl=’git pull’
alias gp=’git push’
I constantly find myself wondering what the difference is between what I’ve committed to my local Git repository, and what’s been pushed up to Github. Here’s one way, I’m sure there’s others:
git cherry -v origin
Or, how about a bash alias?
alias push?='git cherry -v origin'
git log -S'some_string'
git whatchanged -p (after the pager comes up, type '/' and then 'some_string')
Preventing your developers (and yourself) from breaking the build is as simple as putting this in your .git/hooks/pre-commit and making it executable (chmod +x .git/hooks/pre-commit).
#!/bin/sh
rake spec 2> /dev/null
This will stop the commit if the specs don’t pass.
# Just add the following to your deploy recipe
set :git_enable_submodules, true