git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Robert Haines <rhaines@manchester.ac.uk>
To: Git Mailing List <git@vger.kernel.org>
Subject: Pushing an --amend-ed commit
Date: Mon, 2 Jun 2008 10:51:47 +0100	[thread overview]
Message-ID: <6B355924-0EA9-4AF8-B051-F17FC4530495@manchester.ac.uk> (raw)

Hi list,

The other day I did the classic:

1) Right, changes all done and committed. Push to public repo.
2) Bugger, missed out an obvious one-liner in a Makefile. Make change  
and --amend that last commit.
3) Push to public repo again... Ah, "Not a strict subset" error, can't  
push...

It's obvious (I think) to me why I get this error - the commit now has  
a different hash so it looks like it would be the wrong thing to do to  
allow the push as far as git is concerned. Right?

So, is it safe to "use the --force" in this instance when pushing?  
This should just replace the old commit with the --amended commit with  
no side-effects, shouldn't it?

Thanks,
Rob

-- 
Robert Haines

Research Associate, RealityGrid          Tel. : +44 (0)161 275 6067
Research Computing Services              Fax. : +44 (0)161 275 0637
University of Manchester                 Email: rhaines@manchester.ac.uk
Oxford Road                              Web  : www.realitygrid.org
Manchester, M13 9PL, UK                       : www.rcs.manchester.ac.uk

             reply	other threads:[~2008-06-02 10:11 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-06-02  9:51 Robert Haines [this message]
2008-06-02 14:55 ` Pushing an --amend-ed commit [and a git-merge-theirs strategy] Paolo Bonzini
2008-06-03 17:49   ` Robert Haines
2008-06-03  0:08 ` Pushing an --amend-ed commit Matt Pearson
2008-06-03  0:22   ` Matt Pearson

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

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=6B355924-0EA9-4AF8-B051-F17FC4530495@manchester.ac.uk \
    --to=rhaines@manchester.ac.uk \
    --cc=git@vger.kernel.org \
    /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.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).