My most used Terminal + git commands.

One of the most important things when it comes to development is learning how Terminal (bash) commands work as it will make developing a lot faster!

I'll use this as a personal glossary and keep on updating this as I learn new commands and tricks.

Basic Bash commands that's a must

  • cd /dir/to/folder - change directory
  • ls - list files & folders in directory
  • pwd - path to your current directory
  • mkdir dirname - create new directory
  • rm filename - delete file
  • rm -r /dir/to/folder - delete folder

Git commands - the ones I use most often

  • git init - Initialise GIT into Directory
  • git status - Check status of local repository
  • git commit -m "my message" - Commit changes
  • git checkout -b branchname - Create new branch
  • git push origin master - push files to Master Branch
  • git reflog - list everything you've done in git, indexed.
  • git reset HEAD@{index} - Go back to specific commit
  • git commit --amend - recommit
  • git branch - Switch to another branch
  • git clone git@github.com:ronaldlangeveld/ineedthis.git - clone this repository

Last updated: 12 June 2018

Show Comments