Skip to content

Instantly share code, notes, and snippets.

@timshadel
Last active December 14, 2015 20:48
Show Gist options
  • Save timshadel/5145909 to your computer and use it in GitHub Desktop.
Save timshadel/5145909 to your computer and use it in GitHub Desktop.

Straight

Add a staging deployment
$ heroku create myapp-stage -r stage
Creating myapp-stage... done, stack is cedar
http://myapp-stage.herokuapp.com/ | [email protected]:myapp-stage.git
Git remote stage added

Check that the git remote was named properly
$ git remote -v
origin  https://github.com/ghuser/myapp.git (push)
origin  https://github.com/ghuser/myapp.git (fetch)
prod  [email protected]:myapp-prod.git (fetch)
prod  [email protected]:myapp-prod.git (push)
stage [email protected]:myapp-stage.git (push)
stage [email protected]:myapp-stage.git (fetch)

End

$ heroku create myapp-stage -r stage  # Add a staging deployment
Creating myapp-stage... done, stack is cedar
http://myapp-stage.herokuapp.com/ | [email protected]:myapp-stage.git
Git remote stage added

$ git remote -v  # Check that the git remote was named properly
origin  https://github.com/ghuser/myapp.git (push)
origin  https://github.com/ghuser/myapp.git (fetch)
prod  [email protected]:myapp-prod.git (fetch)
prod  [email protected]:myapp-prod.git (push)
stage [email protected]:myapp-stage.git (push)
stage [email protected]:myapp-stage.git (fetch)

As Bash comment in shell line

$ #
$ # Add a staging deployment
$ heroku create myapp-stage -r stage
Creating myapp-stage... done, stack is cedar
http://myapp-stage.herokuapp.com/ | [email protected]:myapp-stage.git
Git remote stage added

$ #
$ # Check that the git remote was named properly
$ git remote -v
origin  https://github.com/ghuser/myapp.git (push)
origin  https://github.com/ghuser/myapp.git (fetch)
prod  [email protected]:myapp-prod.git (fetch)
prod  [email protected]:myapp-prod.git (push)
stage [email protected]:myapp-stage.git (push)
stage [email protected]:myapp-stage.git (fetch)

Multiline comment hack

# \
# Add a staging deployment
$ heroku create myapp-stage -r stage
Creating myapp-stage... done, stack is cedar
http://myapp-stage.herokuapp.com/ | [email protected]:myapp-stage.git
Git remote stage added

# \
# Check that the git remote was named properly
$ git remote -v
origin  https://github.com/ghuser/myapp.git (push)
origin  https://github.com/ghuser/myapp.git (fetch)
prod  [email protected]:myapp-prod.git (fetch)
prod  [email protected]:myapp-prod.git (push)
stage [email protected]:myapp-stage.git (push)
stage [email protected]:myapp-stage.git (fetch)

Dash

-> Add a staging deployment
$ heroku create myapp-stage -r stage
Creating myapp-stage... done, stack is cedar
http://myapp-stage.herokuapp.com/ | [email protected]:myapp-stage.git
Git remote stage added

-> Check that the git remote was named properly
$ git remote -v
origin  https://github.com/ghuser/myapp.git (push)
origin  https://github.com/ghuser/myapp.git (fetch)
prod  [email protected]:myapp-prod.git (fetch)
prod  [email protected]:myapp-prod.git (push)
stage [email protected]:myapp-stage.git (push)
stage [email protected]:myapp-stage.git (fetch)

Double pound

##
## Add a staging deployment
$ heroku create myapp-stage -r stage
Creating myapp-stage... done, stack is cedar
http://myapp-stage.herokuapp.com/ | [email protected]:myapp-stage.git
Git remote stage added

##
## Check that the git remote was named properly
$ git remote -v
origin  https://github.com/ghuser/myapp.git (push)
origin  https://github.com/ghuser/myapp.git (fetch)
prod  [email protected]:myapp-prod.git (fetch)
prod  [email protected]:myapp-prod.git (push)
stage [email protected]:myapp-stage.git (push)
stage [email protected]:myapp-stage.git (fetch)

Rocket

=> Add a staging deployment
$ heroku create myapp-stage -r stage
Creating myapp-stage... done, stack is cedar
http://myapp-stage.herokuapp.com/ | [email protected]:myapp-stage.git
Git remote stage added

=> Check that the git remote was named properly
$ git remote -v
origin  https://github.com/ghuser/myapp.git (push)
origin  https://github.com/ghuser/myapp.git (fetch)
prod  [email protected]:myapp-prod.git (fetch)
prod  [email protected]:myapp-prod.git (push)
stage [email protected]:myapp-stage.git (push)
stage [email protected]:myapp-stage.git (fetch)

Pound Rocket

#=> Add a staging deployment
$ heroku create myapp-stage -r stage
Creating myapp-stage... done, stack is cedar
http://myapp-stage.herokuapp.com/ | [email protected]:myapp-stage.git
Git remote stage added

#=> Check that the git remote was named properly
$ git remote -v
origin  https://github.com/ghuser/myapp.git (push)
origin  https://github.com/ghuser/myapp.git (fetch)
prod  [email protected]:myapp-prod.git (fetch)
prod  [email protected]:myapp-prod.git (push)
stage [email protected]:myapp-stage.git (push)
stage [email protected]:myapp-stage.git (fetch)

Italics

Add a staging deployment

$ heroku create myapp-stage -r stage
Creating myapp-stage... done, stack is cedar
http://myapp-stage.herokuapp.com/ | [email protected]:myapp-stage.git
Git remote stage added

Check that the git remote was named properly

$ git remote -v
origin  https://github.com/ghuser/myapp.git (push)
origin  https://github.com/ghuser/myapp.git (fetch)
prod  [email protected]:myapp-prod.git (fetch)
prod  [email protected]:myapp-prod.git (push)
stage [email protected]:myapp-stage.git (push)
stage [email protected]:myapp-stage.git (fetch)

More

#
# Add a staging deployment
$ heroku create myapp-stage -r stage
Creating myapp-stage... done, stack is cedar
http://myapp-stage.herokuapp.com/ | [email protected]:myapp-stage.git
Git remote stage added
#
# Check that the git remote was named properly
$ git remote -v
origin  https://github.com/ghuser/myapp.git (push)
origin  https://github.com/ghuser/myapp.git (fetch)
prod  [email protected]:myapp-prod.git (fetch)
prod  [email protected]:myapp-prod.git (push)
stage [email protected]:myapp-stage.git (push)
stage [email protected]:myapp-stage.git (fetch)

Joined

#
# Add a staging deployment
$ heroku create myapp-stage -r stage
Creating myapp-stage... done, stack is cedar
http://myapp-stage.herokuapp.com/ | [email protected]:myapp-stage.git
Git remote stage added

#
# Check that the git remote was named properly
$ git remote -v
origin  https://github.com/ghuser/myapp.git (push)
origin  https://github.com/ghuser/myapp.git (fetch)
prod  [email protected]:myapp-prod.git (fetch)
prod  [email protected]:myapp-prod.git (push)
stage [email protected]:myapp-stage.git (push)
stage [email protected]:myapp-stage.git (fetch)

Comment indent

 #
 # Add a staging deployment
$ heroku create myapp-stage -r stage
Creating myapp-stage... done, stack is cedar
http://myapp-stage.herokuapp.com/ | [email protected]:myapp-stage.git
Git remote stage added

 #
 # Check that the git remote was named properly
$ git remote -v
origin  https://github.com/ghuser/myapp.git (push)
origin  https://github.com/ghuser/myapp.git (fetch)
prod  [email protected]:myapp-prod.git (fetch)
prod  [email protected]:myapp-prod.git (push)
stage [email protected]:myapp-stage.git (push)
stage [email protected]:myapp-stage.git (fetch)

Slashes

//
// Add a staging deployment
$ heroku create myapp-stage -r stage
Creating myapp-stage... done, stack is cedar
http://myapp-stage.herokuapp.com/ | [email protected]:myapp-stage.git
Git remote stage added

//
// Check that the git remote was named properly
$ git remote -v
origin  https://github.com/ghuser/myapp.git (push)
origin  https://github.com/ghuser/myapp.git (fetch)
prod  [email protected]:myapp-prod.git (fetch)
prod  [email protected]:myapp-prod.git (push)
stage [email protected]:myapp-stage.git (push)
stage [email protected]:myapp-stage.git (fetch)

No space

#Add a staging deployment
$ heroku create myapp-stage -r stage
Creating myapp-stage... done, stack is cedar
http://myapp-stage.herokuapp.com/ | [email protected]:myapp-stage.git
Git remote stage added

#Check that the git remote was named properly
$ git remote -v
origin  https://github.com/ghuser/myapp.git (push)
origin  https://github.com/ghuser/myapp.git (fetch)
prod  [email protected]:myapp-prod.git (fetch)
prod  [email protected]:myapp-prod.git (push)
stage [email protected]:myapp-stage.git (push)
stage [email protected]:myapp-stage.git (fetch)

Code snippets test.

myapp $ git status
# On branch master
nothing to commit, working directory clean
myapp $ git status
# On branch master
nothing to commit, working directory clean
myapp $ git status
# On branch master
nothing to commit, working directory clean

Bash with #

myapp # git status
 # On branch master
 nothing to commit, working directory clean
# git status
 # On branch master
 nothing to commit, working directory clean
# git status
# On branch master
nothing to commit, working directory clean

Bash with $

myapp $ git status
 # On branch master
 nothing to commit, working directory clean
$ git status
 # On branch master
 nothing to commit, working directory clean
$ git status
# On branch master
nothing to commit, working directory clean

Console with #

myapp # git status
 # On branch master
 nothing to commit, working directory clean
# git status
 # On branch master
 nothing to commit, working directory clean
# git status
# On branch master
nothing to commit, working directory clean

Console with $

myapp $ git status
 # On branch master
 nothing to commit, working directory clean
myapp$ git status
On branch master
nothing to commit, working directory clean
$ git status
 # On branch master
 nothing to commit, working directory clean
$ git status
# On branch master
nothing to commit, working directory clean
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment