# Cheat sheet of Git, Github and Heroku ## I. Minimum Basics of Git and Github ### 1. Git ```bash git init #only first time git add . git commit -m "<comment>" ``` ### 2. Deploy to Github * **Create Github repository before using the following command.** ```bash git remote add origin <URL of Github repository> git push origin master ``` ## II. Further basics of Git and Github ### 1. Pull from Github ```bash git pull origin master ``` ### 2. Clone from Github ```bash git clone <URL of Github repository> ``` ## III. Beyond basics of Git and Github ### 1. Create remote repository (e.g. in dropbox) ```bash git init --bare --shared=true ``` ## IV. Work with Heroku ### 1. Create `Procfile` ```bash web: gunicorn app:server ``` ### 2. Create `requirements.txt` The following command automatically create the file. ```bash pip freeze > requirements.txt ``` ### 3. Create `.gitignore` ### 4. Deploy to Heroku ```bash git init heroku create <application-name> git add . git commit -m '<comment>' git push heroku master ``` You can view your app at `https://<application-name>.herokuapp.com/`
×
Sign in
Email
Password
Forgot password
or
By clicking below, you agree to our
terms of service
.
Sign in via Facebook
Sign in via Twitter
Sign in via GitHub
Sign in via Dropbox
Sign in with Wallet
Wallet (
)
Connect another wallet
New to HackMD?
Sign up