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
@alaxalves
Copy link

For those striving to "install" this, simply do this:

  1. Download the git-cagate.sh file
  2. sudo ./git-cagate.sh

And that's it!!!

@andre-filho
Copy link

Holy heck this is a great!
Now I can cagate my code workflow!
Tnx

@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