From: Fredrik Gustafsson <iveqy@iveqy.com>
To: "Saša Tomić" <tomic80@gmail.com>
Cc: Jeff King <peff@peff.net>, git <git@vger.kernel.org>
Subject: Re: git undo # last command
Date: Fri, 16 Aug 2013 22:29:04 +0200 [thread overview]
Message-ID: <20130816202904.GA21779@paksenarrion.iveqy.com> (raw)
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
prev parent reply other threads:[~2013-08-16 22:20 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-16 8:55 git undo # last command Saša Tomić
2013-08-16 13:26 ` Jeff King
2013-08-16 14:21 ` Saša Tomić
2013-08-16 20:29 ` Fredrik Gustafsson [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20130816202904.GA21779@paksenarrion.iveqy.com \
--to=iveqy@iveqy.com \
--cc=git@vger.kernel.org \
--cc=peff@peff.net \
--cc=tomic80@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).