After last commit my team decided remote has grown too heavy and would be better to make a new one to split tasks between asset testing (heavy repo) and functionality testing (light repo). So I made a push --mirror and created a new repo, but it is still affected by a last commit and appears to be too heavy. Is it possible to revert last commit on a new repository before cloning to local machine? (since all heavy assets added with the last commit are unuseful for new repo)
The command
git push -f . commit:branch
can achieve the same effect on a bare repository by resetting the branch named "branch" to point to commit commit
.
Note that it works in normal repositories, too, except for cases where the branch you're about to reposition is currently checked out and the commit HEAD
points at is not commit
.
There's also the git update-ref
command but I'd say it's too low level to use under "normal" circumstances.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With