Last active
May 22, 2018 15:54
-
-
Save sadmansh/7865c2498059ca218ad3543d10c961bf to your computer and use it in GitHub Desktop.
GitHub CLI commands cheatsheet
This file contains 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
# Clone into existing directory | |
git init | |
git remote add origin PATH/TO/REPO | |
git fetch | |
git reset origin/master # this is required if files in the non-empty directory are in the repo | |
git checkout -t origin/master | |
# Add all files | |
git add . | |
# Remove files in .gitignore | |
git rm -r --cached . | |
# Commit | |
git commit -m "Commit message" | |
# Push | |
git push origin <branch/optional> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment