Skip to content

Instantly share code, notes, and snippets.

View tysonwolker's full-sized avatar

Tyson Wolker tysonwolker

  • Q-CTRL
  • undefined
View GitHub Profile
@tysonwolker
tysonwolker / git-cheat-list.md
Created February 20, 2017 23:25
Git cheat list

Git cheat list

  • name of the current banch and nothing else (for automation)

    git rev-parse --abbrev-ref HEAD
    
  • all commits that your branch have that are not yet in master

    git log master..<HERE_COMES_YOUR_BRANCH_NAME>
    
@tysonwolker
tysonwolker / git-cheat-list.md
Created February 20, 2017 23:25
Git cheat list

Git cheat list

  • name of the current banch and nothing else (for automation)

    git rev-parse --abbrev-ref HEAD
    
  • all commits that your branch have that are not yet in master

    git log master..<HERE_COMES_YOUR_BRANCH_NAME>
    

Magic words:

psql -U postgres

Most \d commands support additional param of __schema__.name__ and accept wildcards like *.*

  • \q: Quit/Exit
  • \c __database__: Connect to a database
  • \d __table__: Show table definition including triggers