Skip to content

Instantly share code, notes, and snippets.

@spielhoelle
Last active January 31, 2018 10:48
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save spielhoelle/d64f5d02c4ad23b2d82e37a681d26d47 to your computer and use it in GitHub Desktop.
Save spielhoelle/d64f5d02c4ad23b2d82e37a681d26d47 to your computer and use it in GitHub Desktop.
git clone https://github.com/USERNAME/REPONAME
git pull
git status
git commit -m "COMMIT MESSAGE"
git checkout -b BRANCHNAME
git push
git push --set-upstream origin BRANCHNAME (to publish branch the first time)
checkout last branch:
git checkout -
(also works with cd: "cd -" goes always to the last folder position)
git reset --hard (reset to the last commit and discard all changes)
git ls-remote (show all remote branches)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment