Skip to content

Instantly share code, notes, and snippets.

@colehocking
Last active January 11, 2023 23:30
Show Gist options
  • Save colehocking/ee9421da008939188647035659593492 to your computer and use it in GitHub Desktop.
Save colehocking/ee9421da008939188647035659593492 to your computer and use it in GitHub Desktop.
#######################
## Github Cheatsheet ##
#######################
# Git Global Setup #
git config --global user.name "Cole Hocking"
git config --global user.email "<my-email-addr>"
# Token Authentication #
( Settings --> <> Developer Settings --> Personal Access Tokens)
git remote set-url origin https://<TOKEN>@github.com/colehocking/repo.git
# New Repo #
git clone https://githhub.com/colehocking/repo.git
cd repo
touch README.md
git add README.md
git commit -m "commit message"
git push -u origin master
# Existing Repo #
cd existing_folder
git init
git remote add origin https://githhub.com/colehocking/repo.git
git add .
git commit -m "commit msg"
git push -u origin master
# Gist #
git clone [email protected]:#####.git mygist
cd mygist
git add .
git commit -m "commit msg"
git push origin master
# Redo Gist #
cd mygist
git remote add origin [email protected]:####.git
git fetch origin
# Push changes; set upstream for master #
git push -u origin master
# Bypass https #
git clone -c http.sslVerify=false https://github/repo.git
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment