From: Sam Steingold <sds@gnu.org>
To: "Dirk Süsserott" <newsletter@dirk.my1.cc>
Cc: git@vger.kernel.org
Subject: Re: modifying the commits before push
Date: Wed, 18 Jan 2012 16:47:20 -0500 [thread overview]
Message-ID: <87sjjc3cpj.fsf@gnu.org> (raw)
In-Reply-To: <4F17291A.8020600@dirk.my1.cc> ("Dirk \=\?utf-8\?Q\?S\=C3\=BCsserot\?\= \=\?utf-8\?Q\?t\=22's\?\= message of "Wed, 18 Jan 2012 21:18:34 +0100")
Hi Dirk,
> * Dirk Süsserott <arjfyrggre@qvex.zl1.pp> [2012-01-18 21:18:34 +0100]:
> Am 18.01.2012 18:49 schrieb Sam Steingold:
>
> to modify the last 4 commits you can use git filter-branch (see the
> manpage):
>
> $ git checkout master
> $ git filter-branch --env-filter \
> 'GIT_COMMITTER_EMAIL="sds@gnu.org" \
> GIT_COMMITTER_NAME="Sam Steingold"' \
> HEAD~4..HEAD
>
> It should tell you that it rewrites 4 commits.
I did this; I got a few messages which scrolled very quickly.
status code was 0, apparently, I was successful.
> The original tree is saved under original/refs/heads/master.
where is that?
> If sth. went wrong, reset your master to that point (easiest with
> gitk, it's steel blue). If it worked, you can delete the
> original/refs/heads/master like so:
>
> $ git for-each-ref --format="%(refname)" \
> refs/original/ | xargs -n 1 git update-ref -d
>
> Note: Whether it worked or not, remove the original refs afterwards,
> because a second run of git filter-branch will fail if there's already
> an "original" tree.
alas, I could not push because the remote tree was modified in the
meantime, I pulled and now:
# On branch master
# Your branch is ahead of 'origin/master' by 23 commits.
#
nothing to commit (working directory clean)
so, what do I do now?
is there a way for me to get back my original 4 patches, reset my tree
(maybe by rm-rf+clone) and then re-apply them?
thanks!
--
Sam Steingold (http://sds.podval.org/) on Ubuntu 11.10 (oneiric) X 11.0.11004000
http://jihadwatch.org http://memri.org http://thereligionofpeace.com
http://www.PetitionOnline.com/tap12009/ http://palestinefacts.org
I don't have an attitude problem. You have a perception problem.
next prev parent reply other threads:[~2012-01-18 21:47 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-01-18 17:49 modifying the commits before push Sam Steingold
2012-01-18 20:18 ` Dirk Süsserott
2012-01-18 21:47 ` Sam Steingold [this message]
2012-01-18 22:01 ` Andreas Schwab
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=87sjjc3cpj.fsf@gnu.org \
--to=sds@gnu.org \
--cc=git@vger.kernel.org \
--cc=newsletter@dirk.my1.cc \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.