Skip to content

Instantly share code, notes, and snippets.

@xenophonf
Last active January 11, 2020 22:55
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save xenophonf/95357d87b6e0b5e2b0e6 to your computer and use it in GitHub Desktop.
How I initialized the irtnog/salt-states repository
#!/bin/tcsh
# FIXME: C shell scripting is evil in the eyes of the LORD.
# First create a new, uninitialized repository on GitHub called
# irtnog/salt-states; then execute the following commands.
mkdir salt-states
cd salt-states
echo "# salt-states" > README.md
git init
git add README.md
git commit -m "Initial commit"
git remote add origin git@github.com:irtnog/salt-states.git
git push -u origin master
# The following commands create a development branch that's
# independent of the master. The testing branch is based on
# development, staging on testing, and production on staging.
# http://stackoverflow.com/questions/13969050/how-to-create-a-new-empty-branch-for-a-new-project
git checkout --orphan development
git rm --cached -r .
rm README.md
mkdir -p salt/files/cloud.{maps,profiles,providers}.d
touch salt/files/cloud.{maps,profiles,providers}.d/irtnog.conf
git add salt
git commit -m "Add empty salt-cloud configuration"
git push -u origin development
git checkout -b testing development
git push -u origin testing
git checkout -b staging testing
git push -u origin staging
git checkout -b production staging
git push -u origin production
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment