Skip to content
Marie-Louise edited this page Aug 21, 2018 · 34 revisions

Basics

General

move back one directory

$ cd ..

Update master branch

$ git checkout master

$ git fetch origin - p

$ git reset --hard origin/master

$ git log
  • NOTE: git fetch origin can be executed on any branch

Branch

create new branch

$ git checkout -b <local_branch_name>

delete branch

$ git branch -d <local_branch_name>

display full list of git branches

$ git branch -a

Push local branch

$ git push origin <local_branch_name>

History

view the history

$ git log

Switch branches

$ git checkout <local_branch_name>

Other

Setting up Drupal environment in AWS

Clone this wiki locally