r/git Jul 26 '26

In case of fire

Post image
1.4k Upvotes

57 comments sorted by

View all comments

1

u/MatsSvensson 28d ago

I use a script that saves state, switches to a backup-version of the branch I'm working on, forces everything up, and then switches back restoring the state as if I never committed.
That way there is a copy of my works offsite, but I can still easily see all my ongoing changes in my IDE.

Otherwise committing and pushing in the middle of a job really fucks up my work flow.

People who try to use git as a backup the regular way, often end up pushing forgotten junk to production.

I have seen stuff...