Created
March 23, 2021 07:34
-
-
Save arkuznetsov/8b0665f33d0b6fa865371947c29e99f0 to your computer and use it in GitHub Desktop.
Выполняет коммит от имени указанного автора/коммитера на указанные дату и время
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
rem Выполняет коммит от имени указанного автора/коммитера на указанные дату и время | |
rem Время указывается по московскому часовому поясу (+3 часа) | |
rem Пример: .\commit.cmd "Artem Kuznetsov" [email protected] "2021-03-05 01:30:00" "мой новый коммит от 05.03.2021" | |
set AUTHOR=%1 | |
set AUTHOR=%AUTHOR:"=% | |
set EMAIL=%2 | |
set EMAIL=%EMAIL:"=% | |
set GIT_COMMITTER_DATE=%3 | |
set GIT_COMMITTER_DATE=%GIT_COMMITTER_DATE:"=%.000000000 +0300 | |
set GIT_COMMITTER_NAME=%AUTHOR% | |
set GIT_COMMITTER_EMAIL=%EMAIL% | |
set MESSAGE=%4 | |
set MESSAGE=%MESSAGE:"=% | |
git commit --date="%GIT_COMMITTER_DATE%" --author="%AUTHOR% <%EMAIL%>" -m "%MESSAGE%" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment