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

git filter-branch re-write history over a range of commits did notwork

From
LU Chuck <chuck.lu@edenred.com>
Date
May 27, 2019, 08:11 UTC
Message-ID
<DB7PR05MB5573349C498A5680A5133F1A8D1D0@DB7PR05MB5573.eurprd05.prod.outlook.com>
Hi team,
    The issue comes from https://github.com/git-for-windows/git/issues/2206.
 
    I want to re-write history by filter-branch command over a range of commits, but the command did not work.
    I have referred to the following three documentation about how to use git filter-branch:
    https://stackoverflow.com/questions/15250070/running-filter-branch-over-a-range-of-commits
    https://stackoverflow.com/questions/28536980/git-change-commit-date-to-author-date
    https://git-scm.com/docs/git-filter-branch
 
    You can reproduce the problem by the following steps
    1. clone the repository https://github.com/chucklu/LeetCode/
    2. checkout to the temp branch
    3. run the command git filter-branch --env-filter 'export GIT_COMMITTER_DATE="$GIT_AUTHOR_DATE"' ... 67d9d9..f70bf4
    4. You will got the info "Found nothing to rewrite"
 
    However, it was supposed to overwrite the history from commit 9c1580 to commit f70bf4, make the commit date same as date.
    I am not sure if I am using the filter-branch correctly, or if there is a bug in git?
 
   Anyone can help me? Thanks in advance.
 
Chuck Lu
Regards
Message 1 of 1 in “git filter-branch re-write history over a range of commits did notwork”
  1. LU ChuckMay 27, 2019

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.