Automatic Commit and Push to GitHub from Android Studio

て烟熏妆下的殇ゞ 提交于 2020-01-11 03:57:06

问题


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.


回答1:


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:

schedule running a bash shell script in windows

Running .sh every 5 minutes



来源:https://stackoverflow.com/questions/45399566/automatic-commit-and-push-to-github-from-android-studio

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!