Recently while working on a freelance project, i came across an interesting scenario where the previous developer has maintained 2 repositories, one in gitlab and the other in heroku.
The gitlab account is a repository to hold the code, and the heroku repository is linked to the build pipeline. i have made changes to the gitlab repository and the changes needs to be made to the master branch of heroku repository.
This is a scenario which i have never encountered before. After some investigation i found out that, you would do this when you want to create a new app from the same base or core (that's meant to be its purpose, but the scenario here is different).
Coming to the solution,
Add the other repository as a remote
git remote add upstream https://www.gitlab.com/something/somrepo.git
(upstream refers to the gitlab repository)Now the two remotes will be shown (Screenshot from Source Tree)
Now pull the changes from master branch of gitlab repository to heroku.
git pull upstream master
Push the changes to the repository , now your heroku branch will have all the changes from the master branch of gitlab.
sooo, can't you just ... use the heroku command to get the changes? to update?