That right! Git is upset that you'd put your system to sleep without committing changes across local projects. First world problem for every developer. What's worse than losing all your unsaved changes due to an unfortunate hard drive crash? Been there, seen that just a month back to realise the importance of not just making commits, but making them just in time.
Well! Once bitten twice shy and here's a nifty little tool for help. 🚀
- Linux! Should work across distros but I've tested it for success on my Arch machine
- The tool hooks into event callbacks offered by
acpid
and hence requires it to be installed- Ubuntu:
sudo apt install acpid
- Arch Linux:
sudo pacman -S acpid
- Other distros:
No idea, look it up :D
- Ubuntu:
- Innately, it intercepts power button presses to conditionally suspend your system and hence requires you to disable the "power button suspends" functionality in system settings
- You must have superuser (
sudo
) access‼️
- Download this repo and extract the
.zip
to a directory - Fire up a terminal in that directory
- Run
sudo chmod a+x install.sh
- Run
install.sh
⛔ DO NOT:
❌ Run the installer twice (don't want your system sleeping repeatedly right? 💩)
❌ Fire up the terminal for installation from some other directory
You'd now want to enlist your local Git projects to be tracked:
- Open file
~/.config/py-crestfallen-git/projects
in your favorite editor - Enlist absolute paths to your Git project directories on separate lines
- e.g.
/home/jerry/Projects/TicTacToe
- e.g.
- Save and close
Euh, now just press that power button. 🌚
An uninstaller is on the way so stay tuned! If you liked the repo, do 🔨 the ⭐ button and feel free to raise issues, if you face any.
Made with ❤️ by theGeekyLad