Skip to content

Instantly share code, notes, and snippets.

@EileenJuergens
Last active February 23, 2021 13:41
Show Gist options
  • Save EileenJuergens/9d0b9225914e92cebf34dfdaef26f897 to your computer and use it in GitHub Desktop.
Save EileenJuergens/9d0b9225914e92cebf34dfdaef26f897 to your computer and use it in GitHub Desktop.
Git commands
git status // show files with and without stage
git add file.js // save changes to stage
git reset file.js // undo stage of file.js
git commit // commit changes staged with a comment
git log // show commits
git push origin master // origin is the upstream and master is the branch
git remote -v // show upstream
git remote set-url origin url.git // changes origin upstream
git branch // show you current branch and all the branchs
git checkout branchName // change branch
git branch -D branchName // delete branch
git checkout -b branchName // move and create branch
git pull origin master // pull changes from origin upstream and from master branch
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment