How to link a folder with an existing Heroku app with mercurial

两盒软妹~` 提交于 2019-12-04 10:22:51

I'd suggest trying Hg-Git's "intree" configuration option. Set that by adding the following to your hgrc:

[git]
intree = True

With that set, the Git repository used internally by Hg-Git will be stored as a ".git" directory within the working copy, rather than nested within the ".hg" directory.

Heroku will then see this repository's config. Add a remote as suggested in the other answer (quoted below), and you should be all set.

git remote add heroku git@heroku.com:<app-name>.git

For now, the best documentation of Hg-Git configuration options that I've found is the README displayed on the project's Bitbucket page: https://bitbucket.org/durin42/hg-git

Considering heroku is looking at the .git/config file to get the app name, just do the following inside your local repository:

git init
git remote add heroku git@heroku.com:<app-name>.git

In order not to mess your repository, you'll also add the following lines to .hgignore:

#Git setup
.git/**

Now, usual heroku commands no more ask for the default app name.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!