Skip to content

Instantly share code, notes, and snippets.

@TRex22
Created April 4, 2018 08:21
Show Gist options
  • Save TRex22/e0c0cbce50c7436b01a09dc8535f0fb8 to your computer and use it in GitHub Desktop.
Save TRex22/e0c0cbce50c7436b01a09dc8535f0fb8 to your computer and use it in GitHub Desktop.
A bash script to help with ruby on rails development. It will warn you when there is a `focus` or a `binding.pry` being staged in your code. Future versions of this will use variables and maybe identify the specific code (I dont really have plans for any of this atm)
#!/bin/bash
# git config --global alias.addall '! ~/git_addall.sh'
git diff|grep 'focus' --color
git diff --name-only | xargs grep --color -Hn focus
git diff|grep 'binding.pry' --color
git diff --name-only | xargs grep --color -Hn binding.pry
git add --all
git status
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment