R
R
Roman Rakzin2019-08-04 17:25:58
git
Roman Rakzin, 2019-08-04 17:25:58

How to automate git commits?

Please tell me an example of code that would perform git commit , git pull and substitute the date and time in the commit text. If there were no updates, then do not create a commit. I would like to run the code periodically, can you tell me if it is possible to set a cron task on the command line with a periodic launch? OS Windows

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
Roman Rakzin, 2019-08-04
@TwoRS

cd "c:\Programs\Test\Git1\first\" //just a link to the repository folder
set text= "Reserve Copy: %date% %time% "
git add -A
git commit -m %text%
git push origin master

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question