Skip to content

Instantly share code, notes, and snippets.

@MatheusRich
Last active May 22, 2020 00:07
Show Gist options
  • Save MatheusRich/26aa938c3022ef128550e8c5e73e0791 to your computer and use it in GitHub Desktop.
Save MatheusRich/26aa938c3022ef128550e8c5e73e0791 to your computer and use it in GitHub Desktop.
A simple bash script that creates a custom git command to ignore ALL kinds modifications (untracked files, modified files etc)
#!/bin/bash
# A simple bash script that creates a custom git command to ignore ALL kinds of
# modifications (untracked files, modified files, etc)
# Installation: run `sudo sh git-cagate.sh`
# Usage: run `git cagate` to ignore ALL modifications
cd /bin/ || exit
touch git-cagate
echo "touch .empty" >> git-cagate
echo "git add ." >> git-cagate
echo "git stash" >> git-cagate
echo "git stash drop" >> git-cagate
chmod +x git-cagate
@MatheusRich
Copy link
Author

I've added the line touch .empty to prevent git-cagate to drop your fist stash if you run the command without any changes in your branch.

@ThalissonMelo
Copy link

I just love this project. very useful! tnx

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment