Install git on your PC and setup configuration values in either Command Prompt (cmd) or VS Code terminal (Ctrl + `
)
git config --global user.name "Your Name"
git config --global user.email [email protected]
Setup editor
Windows eg.:
git config --global core.editor "'C:/Program Files/Notepad++/notepad++.exe' -multiInst -nosession"
Linux / Mac eg.:
git config --global core.editor vim
Check git settings which displays configuration details
git config --list
Login to github and create a remote repository. Copy the URL of this repository
Navigate to your project directory and execute the below commands
git init // start tracking current directory
git add -A // add all files in current directory to staging area, making them available for commit
git commit -m "commit message" // commit your changes
git remote add origin https://github.com/username/repo-name.git // add remote repository URL which contains the required details
git pull origin master // always pull from remote before pushing
git push -u origin master // publish changes to your remote repository