3

我的项目看起来像这样

|.git(this is the project's git)
|--App1
|--App2
|--MyApp |.git (this is the git for heroku with dummy commits)
         |--SubFolder1
         |--SubFolder2

我有另一个用于 heroku 部署的 git 存储库。

我只使用“MyApp”文件夹使用 intellij-idea。

Intellij 与 ./MyApp/.git 存储库一起使用。

有没有办法告诉 intellij idea 使用 ./.git 存储库?

Aka 我可以设置 git 存储库路径或忽略给定的 .git 存储库吗?

4

1 回答 1

2

There is no way to make IntelliJ work with this setup.

Moreover, setting up such a workspace is not straightforward in Git itself, though possible. If you are inside MyApp, but want to work with the "parent" Git repository, you have to prefix all your commands with --git-dir command that lets you specify the location of .git:

cd .../project/MyApp
git --git-dir=.../project/.git status

To work with a repository IntelliJ invokes Git commads like status, push, etc. And it doesn't support specifying git-dir for them. Maybe it will be implemented in future if you open a feature request in JetBrains bugtracker, but not in the nearest future.

于 2012-11-06T09:43:54.817 回答