Skip to content

Latest commit

 

History

History
56 lines (50 loc) · 1.53 KB

Notes.md

File metadata and controls

56 lines (50 loc) · 1.53 KB

Initialization

Build up repository.

$ git init
Initialized empty Git repository in /Users/hanmeiTang/repos/flask_ex/.git/
# Add remote
$ git remote add origin [email protected]:HanmeiTang/flask_test.git

# Git pull with "unrelated-histories error" ignored
$ git pull origin master --allow-unrelated-histories
From github.com:HanmeiTang/flask_test
 * branch            master     -> FETCH_HEAD
Merge made by the 'recursive' strategy.
 README.md | 2 ++
 1 file changed, 2 insertions(+)
 create mode 100644 README.md
# Git pull from specific remote
$ git push origin master
Counting objects: 16, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (13/13), done.
Writing objects: 100% (16/16), 400.23 KiB | 0 bytes/s, done.
Total 16 (delta 1), reused 0 (delta 0)
remote: Resolving deltas: 100% (1/1), done.
To github.com:HanmeiTang/flask_test.git
   99c0271..b8cc44e  master -> master
# set tracking information for master branch
$ git branch --set-upstream-to=origin/master master

Generate requirement file.

# Standard method
$ pip freeze > requirements.txt
# Here we simply copy requirements.txt from some existing app
$ cp xxxx/requirements .

Create heroku app

$ echo 'web: gunicorn routes:app' > Procfile
$ echo "python-3.5.2" > runtime.txt
$ heroku create
Creating app... done, ⬢ radiant-chamber-83442
https://radiant-chamber-83442.herokuapp.com/ | https://git.heroku.com/radiant-chamber-83442.git

$ git add .
$ git commit -m "heroku config"
$ git push heroku master