Skip to content

Instantly share code, notes, and snippets.

@m7salam
Created March 18, 2020 12:57
Show Gist options
  • Select an option

  • Save m7salam/631587fc4687a0ee4f1d8f49f244cae2 to your computer and use it in GitHub Desktop.

Select an option

Save m7salam/631587fc4687a0ee4f1d8f49f244cae2 to your computer and use it in GitHub Desktop.
git cheat sheet

Github Guide

Basic Commands

To work on dev

$ git checkout dev

To create new feature branch

$ git checkout -b feature

To merge this new feature to the dev branch

#*Consider pull request from the feature branch to be reviewed first ( pull requests can be made from the github interface on the web)

#Make sure you are on the dev branch

$ git merge feature

To setup upstream branch to your dev branch

# Make sure you are on the dev branch.

$ git branch --set-upstream-to=origin/dev

To pull updates from dev branch

# Make sure you are on the dev branch.

$ git pull origin dev

To work on master

#Master will be ONLY for LIVE READY VERSIONS

$ git checkout master

To merge development work to master

# Make sure you are on the master branch when you do the merge with the following command

$ git merge --no-ff dev
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment