4

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.

Marc Bollinger
  • 3,109
  • 2
  • 27
  • 32
Newy
  • 38,977
  • 9
  • 43
  • 59

3 Answers3

3

Create a new branch and use that.

git checkout -b BRANCH_NAME
git push heroku BRANCH_NAME
ponzao
  • 20,684
  • 3
  • 41
  • 58
3

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.

DocOnDev
  • 31
  • 2
1

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).
Toby Hede
  • 36,755
  • 28
  • 133
  • 162