Last active
January 11, 2023 23:30
-
-
Save colehocking/ee9421da008939188647035659593492 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
####################### | |
## 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