Skip to content

Instantly share code, notes, and snippets.

@KarthikMAM
Last active December 13, 2019 07:48
Show Gist options
  • Select an option

  • Save KarthikMAM/3f2e29fe9210ae512ffdb2e74a82b54a to your computer and use it in GitHub Desktop.

Select an option

Save KarthikMAM/3f2e29fe9210ae512ffdb2e74a82b54a to your computer and use it in GitHub Desktop.

Bash CheatSheet

Delete Merged Git Branches

git branch -vv | grep gone | awk '{print $1}' | tr "\n" " " | xargs git branch -d

Get Changed Files List

git diff --name-only

Run rubocop only on changed files

git diff --name-only | xargs rubocop -a
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment