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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Chuck,

On 27/05/2019 19:21, Johannes Sixt wrote:
Am 27.05.19 um 10:01 schrieb LU Chuck:
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
Did you not tell us everything because you write ... in this message
when you cited the command you used, or do you say that you used ...
literally in the command?

The three dots is provided in the literal EXAMPLES section of the man page. That is probably an error, as I think it is meant to be an ellipsis to indicate 'insert other options here'.

Simply remove the three dots ('symmetric diff notation') .

Not sure what the correct change to the man page should be, but clearly it has caused confusion. It also takes a moment to properly realise which commits the two dot notation will refer to in the example which may further compound the confusion about the three dots.

Philip

     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.
-- Hannes




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux