what I’ve done:
git clone ssh://... ...
git commit
...
git commit
but there was a file (something secret 😉 which I should never push.
Normally, i would have done something like
git reset --soft HEAD^
to undo the last one, but it was too many commits ago
or:
git diff REV > /file.patch
to apply it on the top of remote/master, but I want to keep current commits
This works for me
ref