Java Android Studio 将标签推送到远程
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/19862682/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Android Studio push tags to remote
提问by rSilva
I've recently started working with Android Studio and am using git (bitbucket). Whenever I create a stable/releasable version of an application I create a tag so that it becomes easier to spot all the versions among all the commits.
我最近开始使用 Android Studio 并且正在使用 git (bitbucket)。每当我创建应用程序的稳定/可发布版本时,我都会创建一个标签,以便更容易地在所有提交中发现所有版本。
My trouble is that I have not found a way to push my tags to the remote from within Android Studio (either manually or automatically). Until now I have been using git push --tags
through the command line to do the trick.
我的问题是我还没有找到一种方法将我的标签从 Android Studio 中推送到远程(手动或自动)。到现在为止,我一直在git push --tags
通过命令行来使用这个技巧。
Is there any way to make it from inside the IDE or do I have to stick to this not so neat way?
有什么办法可以从 IDE 内部制作它,还是我必须坚持这种不太整洁的方式?
采纳答案by Mikalai Daronin
Unfortunately, you can't push tags from IntelliJ IDEA/Android Studio.
不幸的是,您无法从 IntelliJ IDEA/Android Studio 推送标签。
http://youtrack.jetbrains.com/issue/IDEA-77483
http://youtrack.jetbrains.com/issue/IDEA-77483
EDIT:
编辑:
The latest Studio and IDEA have a "push tags" feature.
最新的 Studio 和 IDEA 具有“推送标签”功能。
回答by MatPag
You can use the Terminal window in Android Studio with this commands:
您可以通过以下命令使用 Android Studio 中的终端窗口:
//push every local tag to remote
git push origin --tags
//push a specific local tag to remote
git push origin : tagName
These commands are usefull if you already have commited your changes
如果您已经提交了更改,这些命令很有用
回答by Qamar
Tags is useful for release build commit.
Once you connected with git tags can be created from Android Studio Menu>VCS>Git>Tag..Then push to that tag.
标签对于发布构建提交很有用。
连接 git 标签后,可以从 Android Studio Menu>VCS>Git>Tag..然后推送到该标签。