0

I have a git repo with a branch I want to check out. But my my intellijidea is linked to my HerokuGit. Can I work from bot? Fetch and merge from Git Repo than push to Heroku?

Hugo y
  • 1,421
  • 10
  • 20
  • I know what Git is, and I know what Heroku is. What is HerokuGit? Are you just asking how to work with multiple remotes? – ChrisGPT was on strike Jun 07 '18 at 23:57
  • Heroku Git makes more sense. When you set up a Heroku, it uses a git for version management. It's not one you can access on Github however. I used the phrase HerokuGit to try and encapsulate that. – user3727777 Jun 11 '18 at 21:54
  • A Git _repository_, not "a git". And of course it's not accessible from GitHub—why would it be? Heroku has nothing to do with GitHub (though it can integrate with it), and GitHub didn't create, and doesn't own, Git. It sounds like you _are_ asking how to use multiple remotes. Learning and using the proper terms is more helpful than making up your own. – ChrisGPT was on strike Jun 11 '18 at 22:02

1 Answers1

0

IntelliJ does not link to any remotes, it works with the local git repository in the project and respects its config. So you just need to do the same you would do for command-line git - add two remotes - one pointing to GitRepo, and another to HerokuGit, then use the first one for fetches, and the second one for push. See e.g. Is it possible to pull from one repo and push to other one? in relation to git itself.

Remotes could be configured via IntelliJ interface. See e.g. https://www.jetbrains.com/help/idea/set-up-a-git-repository.html#add-remote

Dmitrii Smirnov
  • 7,073
  • 1
  • 19
  • 29