Last active
May 22, 2020 00:07
-
-
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)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |
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
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.