1

I would like to "refresh" my local codebase with the code I have deployed to heroku and that is currently running.

I did a

git pull heroku master

And reveived a message saying that everything is up to date. I then tried

git checkout master

Hoping that this would overwrite my local copy of the code with what is available on Heroku. However this did not work. How do I "get" my code that is deployed to Heroku?

Ankur
  • 50,282
  • 110
  • 242
  • 312

2 Answers2

2

Do a git checkout . on your branch, this will remove all your local changes.

you need not pull the code after that

Manjunath Manoharan
  • 4,567
  • 6
  • 28
  • 43
2

It's just a git remote like any other. If you want your local master branch to reflect exactly what's currently in heroku (maybe your local copy diverged incorrectly), you can just

git fetch heroku
git reset --hard heroku/master
hgmnz
  • 13,208
  • 4
  • 37
  • 41