Git Basic Commands Git version check $ git --version User Name and Email Setting $ git config --global user.email "email@example.com" $ git config --global user.name "Mona Lisa" Verify Username and Email $ git config --list $ git config --global user.email $ git config --global user.name Check Git Log and Status $ git status $ git log $ git log --oneline Upload files and folders on GitHub $ git init $ git add . $ git commit -m "Commit messages write here" $ git branch -M main $ git remote add origin [Repository link] $ git push -u origin main Git Branch $ git branch (For showing branches) $ git branch --list $ git branch [branch name] (Create a new branch) $ Example: git branch newBranch $ git checkout [branch name] $ Example: git checkout newBranch $ git checkout -b [branch name] (Create a new branch and checkout that branch) $ Example: git checkout -b newBranch2 $ git merge [branch name] $ Example: git merge newBranch