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

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

问题描述

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

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.

推荐答案

git 和 android studio(或插件)本身没有这样的功能.

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.

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

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:

安排在 Windows 中运行 bash shell 脚本

每 5 分钟运行一次 .sh

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

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