Skip to content

Instantly share code, notes, and snippets.

@marvin-marvin
Last active July 22, 2020 11:15
Show Gist options
  • Save marvin-marvin/2000832e63b9b2fac7ba23ad44a6b74b to your computer and use it in GitHub Desktop.
Save marvin-marvin/2000832e63b9b2fac7ba23ad44a6b74b to your computer and use it in GitHub Desktop.
git cheatsheet
# set repo in folder
git remote add origin https://github.com/marvinmarvink/bash-acc.git
git remote add origin [email protected]:marvin-marvin/bash-keys.git
# modify, push to github
git add FILE or git add -A
git commit -m "bash bamm"
git push
# clone into dir
git clone https://github.com/marvinmarvink/bash-acc
# checkout master branch
git checkout master
### Git force pull to overwrite local files
# navigate into git dir before executing
git fetch --all
git reset --hard origin/master
git pull origin master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment