# Start postgres prompt
$ sudo -u postgres psql
# Create a database
postgres=# CREATE DATABASE <myproject>;
# Create a user
postgres=# CREATE USER <myprojectuser> WITH PASSWORD <'password'>;
# Django's recommended settings
postgres=# ALTER ROLE myprojectuser SET client_encoding TO 'utf8';
postgres=# ALTER ROLE myprojectuser SET default_transaction_isolation TO 'read committed';
postgres=# ALTER ROLE myprojectuser SET timezone TO 'UTC';
# 1. clone a fresh copy of your repo, using the --mirror flag:
$ git clone --mirror <git://example.com/my-repo.git>
# 2. run the BFG to clean your repository up (e.g. remove large files)
$ bfg --strip-blobs-bigger-than 50M my-repo.git
# 3. use the standard git gc command to strip out the unwanted dirty data
$ cd <my-repo.git>
$ git reflog expire --expire=now --all && git gc --prune=now --aggressive
# 4. push it back up
$ git push
# 5 ditch old copies of the repo and do fresh clones of the nice, new pristine data
$ git clone <git://example.com/my-repo.git>
<script src="https://cdn.jsdelivr.net/gh/google/code-prettify@master/loader/run_prettify.js"></script>
<code class="prettyprint">
# Code written here will be prettified
</code>
$ eval "$(ssh-agent -s)" # start ssh agent in the background
$ ssh-add -l # list all keys in agent
$ ssh-add -D # clean up all keys
$ ssh-add -k ~/.ssh/id_rsa # add a key