I have some commits I am working on and I don't want to lose them if my hard drive crashes. However, I will need to alter them (rebase, squash, reorder, etc) before I am done, so I can't just push the branch to remote, as that would require me to force push later which I don't want to do.
So ... I could just upload the commits without updating the remote branch tag. That way, I can just download the repo, find my commits, and continue working if my harddrive crashes.
Problem is, I don't know how to do that. I have read the refspec parameter specification, it just shows different ways to specify which ref I want to update, but I don't want to update any ref. Googling this is also not helpful, all I see is tutorials on "cherry-pick" and such, which I don't want.
Pushing from detached head doesn't work either, it says to use git push origin HEAD:<name-of-remote-branch>
, but I don't want to specify any branch name.
Is there an (easy) way to only upload the commits and not update any refs? (And no, pushing into a branch anyway and then immidietely force-pushing that branch back to where it was a moment ago is not a good idea.)