Skip to content

Instantly share code, notes, and snippets.

@omarmosid
Created July 12, 2023 11:25
Show Gist options
  • Select an option

  • Save omarmosid/3c37b9cfba632b9af73544b6b0de8472 to your computer and use it in GitHub Desktop.

Select an option

Save omarmosid/3c37b9cfba632b9af73544b6b0de8472 to your computer and use it in GitHub Desktop.
Omars git cheatsheet

Pull from remote

git pull

Know what branch you are on

git branch

Create a new branch

git branch branch-name

Checkout (switch) to a branch

git checkout branch-name

Create and Checkout (switch) to a branch

git checkout -b branch-name

Stage all changes

git add .

Commit Changes

git commit -m "commit message"

Push for first time

Branch name is the name of your branch

git push -u origin branch-name

Push

git push
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment