Android Bitbucket 上的 Studio Bitbucket 插件共享项目不起作用

Android Studio Bitbucket plugin share project on Bitbucket dont work

我的 Android Studio 和 Bitbucket 有问题。如果我尝试在 Bitbucket 上共享我的项目,它不起作用。我启用了 VCS,在那里我可以选择 "Import into Version Control" -> "Share Project...(with the Bitbucket Icon)" 当我点击它时,它的加载和在我的 Bitbucket 帐户中是一个新的存储库,其名称是我选择的,但其中没有文件。它只生成新的存储库。

这里有图片我的意思:

1a。下载最近的 plugin from here 并将其添加到工作室

1b。配置插件(如果你需要它/也在 bitbucket 中添加 ssh 密钥)

  1. 在工作室中启用 vcs (select git)

  1. 在 bb 上创建 repo

4aaa。从 bb

获取 git repo 命令

4b。如果你不使用 ssh 密钥重命名部分 "git@..." 值得你的回购地址与 https

  1. 在工作室终端中粘贴并运行此命令或在您的os中打开终端(如果您首先在windows上安装了git)

  1. 标记要添加到 git 的文件或对项目进行任何更改 (标记为绿色的文件将添加到 vcs - 红色则不会)

  1. 提交您的更改并将项目推送到 git(请注意,仅 运行 cmmmit 不会将任何文件推送到 git 远程)

  1. 输入回购凭证(如果您没有完成 1b)

  1. 你完成了

编辑:

要手动添加(以红色列出)文件到 git 提交,请参阅: via menu or shortcut add

For a good sharing of project there is some file to don't add to repository? Or just add all that is present in the projectfolder. AndroidStudioProjects/myproject.... i link all myproject folder? Thanks @ceph3us

1) 包含所有敏感数据的文件,例如:密码、未受保护的密钥、凭据存储等

2) 任何有值的代码:)

由于 git 存储库(服务器端)是 "public" 且未受保护且文件未加密,我们很容易受到黑客攻击和 code/data 盗窃。

Thanks, i give you one up vote and can't give another :D .. Anyway, i ask this because i use a private repo for share my project with some friends...and for example the folder release is useless and i can avoid do push it? For other sensitive file there are only ca-app-pubb keys for admob...but the project is in private mode...just for share and branch the develops and make something good :)

救援 :) 顺便说一句,请参阅 .gitignore

示例 .git忽略

/.idea/libraries/
.DS_Store
/.gradle/
/gradle/
/build/
/app/build/
/captures/
.externalNativeBuild
/pl.ceph3us.base.common/tmp/
/aars/release/
!/aars/ln

上班"with basic config"我们只想要:

*.gradle /src(其中包含 java/(源代码)res/(资源))等 AndroidManifest.xml

有时我们需要:

/lib(受宠若惊)-但我避免推送到 repo(最终当我们需要一些特定版本时) /jni

所有其他文件都是多余的(当你知道如何设置时 "development ide")

查看 android gradle 插件中的 souceset clousure "for better understand" 我们需要什么 compile/assembly gradle - android 项目