0

I put the following two variables inside .bashrc on my MacOS Monterrey machine:

$ export GIT_AUTHOR_DATE="Wed Feb 16 14:00 2037 -0600"
$ export GIT_COMMITTER_DATE="Wed Feb 16 14:00 2037 -0600"

In the real case the dates are dynamically populated, only the time zone is fixed.

This works as intended when I manually enter the commands into terminal.

It fails inside the .bashrc file after a systerm reboot. I suspect Git is overwriting these two variables during startup, which nullifies the intent of putting this in .bashrc

Is there an alternate way to load these commands after a delay, so that they are set after Git initializes?

Sean D
  • 3,810
  • 11
  • 45
  • 90
  • 1
    On Monterey you should be using `zsh`. – matt Mar 13 '22 at 15:08
  • Git won't override them itself (except for things like `git filter-branch` or `--date` options to `git commit` or the like), but as @matt suggests, if you're on MacOS Monterey you may have zsh as your shell, rather than bash, and zsh reads zshrc files rather than bashrc files. – torek Mar 14 '22 at 07:42

0 Answers0