Skip to content

Instantly share code, notes, and snippets.

@adamsimonini
Last active May 3, 2024 20:24
Show Gist options
  • Save adamsimonini/b48476407115faae8d9b4d93437209e5 to your computer and use it in GitHub Desktop.
Save adamsimonini/b48476407115faae8d9b4d93437209e5 to your computer and use it in GitHub Desktop.
Git commands

Creating new branch

1 - git checkout master

2 - git pull (get latest changes on master)

3 - git checkout -b "{name-of-new-branch}"

Merging main into completed branch

1 - complete changes on your branch

2 - git merge main (attempt to merge main into your branch)

3* - git merge --abort (optional - to give up on merge)

4 - git push (push changes to github)

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