3

I know that for not changing the commit dates, we can use git rebase --ignore-date but i want this to be my default behaviour for every rebase I do.

Is there any way to set it in git configs? Something like

git config --global rebase.ignoreDate true

I don't want to make any alises, is there any sophisticated solution for this?

MANORIT CHAWDHRY
  • 403
  • 3
  • 11

1 Answers1

3

Considering t3436-rebase-more-options.sh, there is no configuration or environment variable which would set --ignore-date by default for a rebase.

If making an alias does not work for your (because you want to type only git rebase, and you cannot override a builtin command by an alias), you might consider a git wrapper (as in here)

The wrapper script can detect a rebase command, add the missing --ignore-dated option, and call the actual git executable with all the parameters initially passed to the wrapper.

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250