Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8636145
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T10:09:20+00:00 2026-06-12T10:09:20+00:00

As I am new at this, I am not sure if this is how

  • 0

As I am new at this, I am not sure if this is how it should be –

I am making a webapp and using heroku for hosting

I want to have several developers working on the same code on github.

I’d like to have 2 servers on heroku – one for production and one for testing(is it also called staging?)

problem is I know what by doing git push heroku master from the webapp folder it will send it to the application to the heroku server which was setup in the first place.

  1. How do I deploy to 2 different heroku instances from the same folder using git? Is it possible/ recommended?

  2. When I push to github it’s usually the master, should I have another branch for test?

  3. Is there a way to transfer an app between heroku instances?

if there’s a place where there is a recommended deployment routine for heroku and github I’d be happy to read it

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T10:09:21+00:00Added an answer on June 12, 2026 at 10:09 am

    When you run git push heroku master ‘heroku’ identifies the remote repository you are pushing to. In your case ‘heroku’ seems to be a reference to your production server. Similarly you probably have an ‘origin’ remote pointing to github.

    If you list your git remotes you’ll probably see something like this:

    > git remote -v 
    heroku  git@heroku.com:heroku_app_name.git (fetch)
    heroku  git@heroku.com:heroku_app_name.git (push)
    origin  git@github.com:your_github_org/repo_name.git (fetch)
    origin  git@github.com:your_github_org/repo_name.git (push)
    

    To push to a different heroku app you can just add that app as a new git remote.

    git remote add heroku-staging git@heroku.com:heroku_staging_app.git
    

    Now you should be able to push to either remote as needed.

    git push origin master //push to github
    git push heroku-staging //deploy to staging
    git push heroku master //deploy to production
    

    In general I suggest that you should not be pushing to heroku manually. Hopefully you can have a continuous integration server watch github, run tests whenever you push changes, and deploy to staging only when your automated tests pass. You can then have a manually triggered CI task which pushes whichever commit is currently on staging to production as well (or even automate production deploys as well).

    You can perform the same configuration using the heroku command line. That also gives you a good way to manage environment variables and other settings on both of your heroku apps:
    https://devcenter.heroku.com/articles/multiple-environments

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm not sure why this SQL query is not working. I'm new to SQL/PHP
Not sure how to do this, here is my code Dim oWeb As New
I figured this would be simple, but being new to SSRS I'm not sure.
I'm very new to threading and thus am not quite sure if this even
I want to create a new web-browser for android, but this browser is not
How can I ensure that this does NOT open in a new window?? onclick=ob=this.form.table;window.open(ob.options[ob.selectedIndex].value)/>
Why does this: (new[]{1,2,3}).Cast<decimal>(); result in an InvalidCastException: Specified cast is not valid.
This works: Entities.WorkOrderSet.Where(MyCustomMethod); This does not: Entities.WorkOrderSet.Where(o => MyCustomMethod(o)); ( [Edit] Even without new
i have defined a receiver for NEW_OUTGOING_CALL broadcast. But this is not getting invoked.
Yo. I'm really quite new to this whole JavaScript business, not to mention AJAX,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.