Skip to content

Instantly share code, notes, and snippets.

@Rio-Nyx
Last active September 12, 2021 05:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Rio-Nyx/c6ef079deb329fd3f122dd992c3769d3 to your computer and use it in GitHub Desktop.
Save Rio-Nyx/c6ef079deb329fd3f122dd992c3769d3 to your computer and use it in GitHub Desktop.
commonly used git commands
git init // creates a local repo
git remote add origin https://..... // adding remote location
git switch master // switch to branch master
git merge main master // merge main with master, should be in main branch
git push origin master // push commits of master branch to remote loc
git add . // add every file in current folder to repo
git commit -am "commit" // commit message
git pull origin master --allow-unrelated-histories // merge conflicts
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment