Quick Refrence of git & github commands
git config --list
git config --global user.name "ohm_vishwa"
git config --global user.email "example@email.com"
git init
git clone <url>
ls
view hidden files
ls -la
git status
git add <file name>
git add .
git commit -m "message"
git commit -am "message"
git push -u origin main
git push
git remote -v
git remote add origin <url>
git remote set-url origin <url>
git branch
git branch -M main
git checkout <branch_name>
git checkout -b <new_branch_name>
git branch -d <branch_name>
git push --set-upstream origin <branch_name>
git diff <branch_name>
git merge <branch_name>
git pull origin main
git log
git reset <file_name>
or,
git reset
git reset HEAD~1
git reset <commit_hash>
or,
git commit --hard <commit_hash>
git remote set-url origin https://<token>@github.com/<user_name>/<repo_name>