Re: git undo # last command
- From
Fredrik Gustafsson <iveqy@iveqy.com>
- Date
- Aug 16, 2013, 20:29 UTC
- Message-ID
- <20130816202904.GA21779@paksenarrion.iveqy.com>
- In-Reply-To
- <CAAUyY9DqCrpMJPKKmzLGWVkoJRPfA5URLQz0uyTLZCPe6QKe5w@mail.gmail.com>
On Fri, Aug 16, 2013 at 04:21:59PM +0200, Saša Tomić wrote:
> git commit ==> git reset --soft HEAD^
The commit does still exists, you can find it in the reflog. This is important if you for example commits a huge file and wants to remove it. That commit needs to be gc:ed too, and this is dangerous...
It's a not common, but often asked, question on #git@freenode . And for many it's hard to understand why a git rm doesn't shrink their repo.
Also consider that many git commands relies on eachother. For example the submodule scripts uses git checkout, clone, etc.
-- Med vänliga hälsningar Fredrik Gustafsson tel: 0733-608274 e-post: iveqy@iveqy.com