自动提交并从Android Studio推送到GitHub [英] Automatic Commit and Push to GitHub from Android Studio

查看:190
本文介绍了自动提交并从Android Studio推送到GitHub的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Android Studio工作了2年多。我曾经在GitHub中创建一个存储库,并使用Android Studio中内置的VCS手动提交文件。但是我需要知道提交和推送过程是否可以在建立初始提交后每5或10分钟自动完成一次。我已经研究过这个问题,并且一无所知。如果有任何方法或插件可以做到这一点,那就太好了。

android studio(或插件)自己。



如果您确实需要此功能,您可以<<使用您自己的脚本和计划在本地计算机上运行脚本。



例如,您可以使用shell脚本来提交和推送更改:

 #!/ bin / bash 

git add。
git commit -m'message'
git push

然后自动运行这些方法的脚本显示:



在Windows中运行bash shell脚本



每5分钟运行一次.html


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.

解决方案

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

这篇关于自动提交并从Android Studio推送到GitHub的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆