git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: failed to push

From
Chris Packham <judge.packham@gmail.com>
Date
Mar 2, 2010, 21:36 UTC
Message-ID
<a038bef51003021336g3ab0b4f6vba2738a18a92dd36@mail.gmail.com>
In-Reply-To
<m3tysylexh.fsf@localhost.localdomain>
On Tue, Mar 2, 2010 at 11:09 AM, Jakub Narebski <jnareb@gmail.com> wrote:
Show 10 quoted lines
> Well, all of us old gitters know: 1) that you should not change
> published (pushed) history, 2) that commits are immutable, and 3) that
> amending a commit generates new commit with correction and therefore
> changes history.
>
> It is true that git documentation ("Git User's Manual", "Git Community
> Book", "Pro Git") can be lacking... unfortunately by the time somebody
> is knowledgeable enough to write git documentaions, he/she is usally
> used to git way of doing things, and the documentation might not be
> newbie-friendly.

I thought I smelt an easy documentation patch but the current help for git commit --amend seems to cover it

"You should understand the implications of rewriting history if you amend a commit that has already been published"

These sections [1],[2] of the git community book could probably do with a note on the consequences or re-writing history. I'll see if I can figure out how to submit a change.

[1] http://book.git-scm.com/4_undoing_in_git_-_reset,_checkout_and_revert.html [2] http://book.git-scm.com/5_modifying_your_history.html

Show 6 quoted lines
>Bruce Korb <bkorb@gnu.org> writes:
>> Then please be kind enough to put a *CAUTION* button next to
>> the amend button and have it bring up something that gives you
>> a little warning.  GIT *could* have been written in a way that
>> causes the remote repo to become synced with my local repo,
>> but apparently it was not and there was not adequate warning.

Shouldn't be too hard to repeat the warning from git help commit. Just not sure of what the least intrusive way to do it is (plus my tcl-fu is weak).

Previous: Jakub NarebskiNext: Chris Packham
Message 8 of 10 in “failed to push”
  1. Bruce KorbMar 1, 2010
  2. Bruce KorbMar 1, 2010
  3. Chris PackhamMar 1, 2010
  4. Bruce KorbMar 1, 2010
  5. Bruce KorbMar 1, 2010
  6. Erik Faye-LundMar 2, 2010
  7. Jakub NarebskiMar 2, 2010
  8. Chris PackhamMar 2, 2010
  9. add notes on re-writing historyChris Packham, Mar 2, 2010
  10. Jacob HelwigMar 1, 2010

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.