git branch -m master main
// create a new branch on the remote named "main"
git push -u origin main
// delete the old branch
git push origin --delete master
git push origin
git push origin2
git config --list
git help config
git reset
git rm --cached $FILE
git log
git log -1
git clone <url> <where to clone>
git clone https://github.com/sdfsdfs sf sdfsf . (dot means current directory)
git remote -view
git branch -a
git diff
// origin = name of remote repository
// main = branch of remote repository
git pull origin main
git push origin main
git branch my-new-feature
git checkout my-new-feature
git push -u origin my-new-feature
git branch --show-current
git checkout main
git pull origin main
git branch --merged
git merge my-new-feature
git push origin main
git branch --merged
git branch -d my-new-feature
git branch -a
git push origin --delete my-new-feature
git status
git diff
git checkout calc.py (if not committed)
git commit --amend (will bring up window)
git log --stat (status of rep )
git cherry-pick
git reset --soft (hash of commit)
git reset --mixed hash of commit (default if not speciified)
# then do a git checkout (filename)
git reset hard (makes all tracked files match. WILL GET RID of changes. Untracked files are ok)
git clean -df (get rid of untracked files and directories)
git reflog (shows what we've been doing) ... enables to find where missing files are
git revert (with hashcode)