In case of fire, use git-backup
🔥
git-backup
is literally likegit stash
, but it makes stashes available on the remote for later use!
yay -S git-backup-git
- From source:
git clone https://github.com/sarpik/git-backup.git
# or: git clone git@github.com:sarpik/git-backup.git
cd git-backup
make install
cd some-git-repo/
git-backup
and later, if you want to apply the backup:
cd some-git-repo/
git stash apply <branch-name>
For ease of use, you could create a git alias for git-backup
:
git config --global alias.backup "!git-backup"
git config --global alias.bp "!git-backup" # extra quick backups 💦💦
and then use it by just running git backup
.
See git-backup(1) (man git-backup
or git-backup -m
).