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)
Asked
Active
Viewed 3,228 times
1 Answers
2
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.

kostix
- 51,517
- 14
- 93
- 176
-
Thanks, that followed with a git gc --prune=now did the trick perfectly. – user3081123 Jan 19 '17 at 13:30