Reputation: 29
I am using windows and i am completely new to github. I have installed desktop client. I wanted a single txt file to automatically uploaded to my github repository when it's changed or updated locally. I want this to completely automatic process as file is also getting updated automatically every hour and as soon as file gets updated i want it to be commit and pushed to my github repository.
Upvotes: 2
Views: 13386
Reputation: 41565
To auto commit every one hour you can create a batch file (.bat
) with this content:
cd C:\path\to\your\git\project
git add --all
git commit -m "autoCommit %date:~-4%%date:~3,2%%date:~0,2%.%time:~0,2%%time:~3,2%%time:~6,2%"
git push
exit
Create a task on the Task Scheduler and run this file every one hour.
(You can also run it every 1 minute and you will be updated almost in "real time").
Upvotes: 9
Reputation: 1058
I don't think it's possible, every change you made need to commit depends on git basics as far i know. It's easy if u use a shortcuts and commit changes you made.
For example i work on visual studio :
CTRL+F5
Upvotes: 0
Reputation: 1816
Auto-commit won't work out of the box because every commit needs a commit message. Probably gitwatch, as proposed by Sid, will help you. I recommend you start by learning some Git basics, e.g. from https://git-scm.com/book/en/v2/Getting-Started-Git-Basics.
Upvotes: 0