Skip to content

Instantly share code, notes, and snippets.

@pauldruziak
Created April 16, 2015 13:36
Show Gist options
  • Save pauldruziak/ca8aec5922e77d36483a to your computer and use it in GitHub Desktop.
Save pauldruziak/ca8aec5922e77d36483a to your computer and use it in GitHub Desktop.
Do I need reset db after I switch branch?
function dbst
set first_branch 'master'
set second_branch (git rev-parse --abbrev-ref HEAD)
if test (echo $argv | wc -w) -ge 1
set first_branch $argv[1]
end
if test (echo $argv | wc -w) -ge 2
set second_branch $argv[2]
end
git diff $first_branch...$second_branch --name-only db/migrate
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment