Skip to content

Instantly share code, notes, and snippets.

@christyanbrayan
Last active August 23, 2023 21:50
Show Gist options
  • Save christyanbrayan/e7b76316948c4f940c105e0efda6c4cf to your computer and use it in GitHub Desktop.
Save christyanbrayan/e7b76316948c4f940c105e0efda6c4cf to your computer and use it in GitHub Desktop.
Everyday git commands

git init

git branch -M main

git branch git branch --all

git checkout -b newbranch git checkout branch git switch

git branch -d name git branch -D name

git add file git add .

git commit -m 'message' -m 'description' -m 'description' git commit

git status

git push origin master git push --set-upstream origin master git push --set-upstream origin name

git branch --set-upstream-to=origin/<branch> name

git pull origin master git pull remote name


git config --list

git config --global user.name "christyan brayan"

git config user.name

git config --global user.email "christyankev@gmail.com"

git config user.email

git config --glopal core.editor subl

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