Checking in code without deploying on Heroku

我们两清 提交于 2020-02-03 09:32:29

问题


I've been successfully running an app on Heroku, but now would like to work with a collaborator on it. Is there a way with can check in (and pull) code without deploying it live? Right now a git push deploys to code the live site.


回答1:


Create a new branch and use that.

git checkout -b BRANCH_NAME
git push heroku BRANCH_NAME



回答2:


One of the advantages of git is that it is distributed and decentralized. You can have multiple remote repositories configured.

I suggest you use github for collaboration with others. This allows you to determine what changes you actually push to heroku.

Set up a github repository and push the project. Then grant your collaborators access to the github repository. Change your workflow to use github as the primary repository and only push to heroku those changes that are production ready.




回答3:


You can also have a look at a service like GitHub* for actual git hosting. As git is entirely distributed, you can have multiple repositories. Use one for remote storage/project coordination and Heroku just for deployment.

  • I use GitHub for my open source stuff and a commercial Unfuddle account for projects (Unfuddle gives you unlimited git repos and issue tracking).


来源:https://stackoverflow.com/questions/2978199/checking-in-code-without-deploying-on-heroku

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