Git Fire

Published

September 21, 2022

Recently, I saw years old meme about an instruction to commit and push your code before leaving the building in case of fire.

This is quite funny, and this might happens to all of us, I think I need to create a post for a reminder to always have alias Fire🔥

In case of fire? Git!

git config --global alias.fire \
'!sh -c "git checkout -b fire-{uid} && \
         git add -A && \
         git commit -m "FIRE" && \
         git push origin fire-{uid}"'

change the {uid} into something that is unique (such as email) after successful addition of command above, we can just run:

git fire

OR we can just copy these commands, either we save it in alias or save it as fire(.bat), and add fire.bat into PATH.

git checkout -b fire-{uid} && git add -A && git commit -m "FIRE" && git push origin fire-{uid}

then we can just run fire.bat in cmd.

At least, this will do. The most important thing in case of fire is git out!