Skip to content

Instantly share code, notes, and snippets.

View spielhoelle's full-sized avatar

Tommy spielhoelle

View GitHub Profile
vim index.html open a file
i - go to insert mode:
: (just colon) access command palette:
:help help
:w write file:
:q quit file:
x - to delete the unwanted character
# Sometimes you need to prepend (bundle exec)
# eg:
# bundle exec rails server
rails -T (show tasks)
rails server (starts server)
rails console (starts console)
rails db:migrate (runns migration - will just work one way. You can rollback one step and run it again)
rails db:rollback (rollback last migration, 1 step)
git clone https://github.com/USERNAME/REPONAME
git pull
git status
git commit -m "COMMIT MESSAGE"
git checkout -b BRANCHNAME
git push
git push --set-upstream origin BRANCHNAME (to publish branch the first time)
checkout last branch:
git checkout -
(also works with cd: "cd -" goes always to the last folder position)