Revert Your (Python) Code From Existing Instance of App Engine

  • Posted on: 27 December 2014
  • By: oon
Revert Python Code From Existing Instance of App Engine

WHAT A DAY!

I just delete hundreds lines of code because I want to revert my last commit (of 1 file, should not all project) by typing this [2]:

git reset --hard HEAD^

then BOOMB! hundreds lines of code I typed in the last few hours just gone... HAHAHAH.

After few minutes PANIC! I got the solution, by download my latest code from latest pushed code on App Engine [1].

appcfg.py download_app -A <your_app_id> -V <your_app_version> <output-dir>

THANK GOD!

[1]https://cloud.google.com/appengine/docs/python/tools/uploadinganapp#Pyth...
[2]http://stackoverflow.com/questions/8903953/git-revert-last-commit-and-re...

Icon by Freepik / CC BY 3.0

Add new comment

Filtered HTML

  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <blockquote> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.
By submitting this form, you accept the Mollom privacy policy.