DEV Community

Discussion on: I'm a Git Master, Ask Me Anything

 
phaberest profile image
Luca Stefano Sartori • Edited

@jonlai have you ever found a trick to get that alias to work?

My solution under zsh is

function gtime() {
    GIT_COMMITTER_DATE="$1" git commit --amend --no-edit --date "$1"
}

used as

gtime YYYY-MM-DDTHH:MM:SS

example

gtime 2020-04-22T23:10:20