i’m new to git and heroku.
I’ve created an app on heroku, pushed some files to the repo.
Now I want fully replace this app’s repo with new content from another folder (and have a .git repo in that folder). What is the right way to do this?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
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.
If you want to completely replace the history of the commits you already pushed by the history of that new second repo, all you should need to do would be:
That would replace the
masterbranch of the remoteherokurepo by themasterbranch of your second repo. But that would loose (or at least keep in reflogs of the remote repo for a while) the history of themasterbranch of the former repo.This assume you can reuse your heroku credentials you already created, following the Heroku quick start page and the Heroku Deploying with git page.