Skip to content

Instantly share code, notes, and snippets.

@dantullis
Last active February 1, 2022 23:36
Show Gist options
  • Save dantullis/ad08d19832d5889731072fd6adbff45f to your computer and use it in GitHub Desktop.
Save dantullis/ad08d19832d5889731072fd6adbff45f to your computer and use it in GitHub Desktop.
Git specific branch commands

Create / push to new Branch and Main

Create new Branch

git switch -C 15-create-auth-k8s

Add changes

git add .

Commit changes

git commit -m “”

Push changes to intermediate branch

git push -u origin 15-create-auth-k8s

Switch back to main to prepare the Merge

git switch main

Merge to Main

git merge --no-ff 15-create-auth-k8s

Push the Merge to Main

git push origin main

Get a specific Branch

git clone -b 01-installed-express --single-branch git@github.com:dantullis/node-express-api-template.git 

Delete local branch

git branch -d 13-k8s-deploy
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment