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

Re: how do I exclude a commit from set of commits to be pushed.

From
Johan Herland <johan@herland.net>
Date
Jul 3, 2010, 20:39 UTC
Message-ID
<201007032239.44639.johan@herland.net>
In-Reply-To
<AANLkTimmCdCn1dkbogdVqzPBMeGQDNEesM8zdarFL_wv@mail.gmail.com>
On Saturday 03 July 2010, Mahesh Vaidya wrote:
Show 5 quoted lines
> Thank for the pointer; Do you think following scriptlet is good for
> modifying specific commit ? and do edit.
> 
> cat ./modify_specific.sh
> git rebase -i $1 && git commit --amend && git rebase --continue

You would need to do "$1^" instead of $1, since 'rebase' works on all commits _since_ the given commit (i.e. not including the given commit). You will also have to change the first line of the rebase "script" that is opened in your editor (from "pick <sha1> to "edit <sha1>").

...Johan
-- 
Johan Herland, <johan@herland.net>
www.herland.net
Previous: Mahesh VaidyaNext: Eric Raible
Message 4 of 5 in “how do I exclude a commit from set of commits to be pushed.”
  1. Mahesh VaidyaJul 3, 2010
  2. Johan HerlandJul 3, 2010
  3. Mahesh VaidyaJul 3, 2010
  4. Johan HerlandJul 3, 2010
  5. Eric RaibleJul 6, 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.