Skip to content

Instantly share code, notes, and snippets.

My Git Cheat Sheet

Setting your branch to exactly match the remote branch

    git fetch origin
    git reset --hard origin/master

If you want to save your current branch's state before doing this (just in case), you can do:

My MongoDB Cheat Sheet

Show All Databases

show dbs

Show Current Database

db