I have been working in Android Studio for more than 2 years. I used to create a repository in GitHub and commit files manually using the built in VCS in Android Studio. But I need to know if the commit and push process can be automatically done every 5 or 10 minutes after establishing the initial commit. I have researched and was clueless on this issue. If there is any way or a plugin to do this, it would be great.
Asked
Active
Viewed 2,896 times
2
-
that's a strange usage case. are you trying to use git as a backup solution? – ApriOri Jul 30 '17 at 12:02
-
Not exactly, but I need to update the code more frequently to the repository. If that's done in background, it will be more easier for me to focus on the project. – Praveen Thirumurugan Jul 30 '17 at 12:05
-
5Then get in the habit of doing it more frequently. Commits "every 5 or 10 minutes" are _much_ less useful than commits made deliberately when it makes sense to commit. Otherwise your `git log` will be full of commits that may be broken (e.g., code doesn't compile or tests don't pass) with commit messages like "Automatic commit". You can work manual committing into your workflow, just like you have presumably worked "save the file I'm currently editing" into your workflow. – ChrisGPT was on strike Jul 30 '17 at 12:25
-
Chris, thanks for this comment. Am little convinced now. – Praveen Thirumurugan Jul 30 '17 at 12:31
-
@Chris I think your comment is worthy of the bounty. Would you consider elaborating it into an answer? – David Rawson Aug 04 '17 at 08:55
-
you may want to schedule pushes but commits should really be human-made, that's the point of a commit; to isolate logical activities on file. – Dakatine Feb 01 '19 at 22:48
1 Answers
6
There is not such feature for git and android studio (or plugin) themselves.
And if you really need this feature, you can use your own script and schedule to run the script on your local machine.
For example, you can use a shell script to commit and push changes:
#!/bin/bash
git add .
git commit -m 'message'
git push
And then auto run the script as these methods show:

Marina Liu
- 36,876
- 5
- 61
- 74