Git Setup

INSTALATION :
GO TO https://git-scm.com/
DOWNLOAD AS PER YOUR OS
GOTO FOLDER WHICH YOU WANT TO UPLOAD
OPEN TERMINAL/CMD IN THAT FOLDER.
BASIC COMMANDS YOU FOLLOW
Set Name and Email Globally (Applies to all your Git projects)
git config --global user.name "Your Full Name"
git config --global user.email "your@email.com"
Note: for local remove —global
INIT
git init
ADD
git add .
COMMIT
git commit -m “message”
IF LOCAL BRANCH IS MASTER OR OTHER CHANGE TO MAIN
git branch -M master main
ADD REMOTE REPOLINK
GO TO GITHUB OR ANY OTHE CLOUD PROVIDER AND CREATE REOPSITEORY.
COPY REPO LINK
git remote add origin https://github.com/user/reponame.git
PUSH CODE ON THE REPO
git push -u orgin main
WHAT IF ADDED WRONG USER.
Go to Control Panel > Go to Credentials Manager > Go to Windows Credentials > delete github.com file or credential.
Remove the .git folder and follow the above steps again.

