sudo apt-get updatesudo apt-get install gitgit config --global user.name "****"
git config --global user.email "****"Go to the required Directory
cd <path>/repogit initgit remote add origin https://github.com/Lozsku/Alpha.gitgit add .git commit -m 'commit_message'git branch -M maingit push -u origin mainIt would automatically ask you for your username and password for GitHub. After entering the details, go to GitHub and refresh. The files would get added there.
Username for 'https://github.com' your_username
Password for 'https://your_username@github.com' : *******
But GitHub is no longer accepting account passwords when authenticating Git operations. You need to add a PAT (Personal Access Token) instead, and you can follow the below method to add a PAT on your system.
From your GitHub account, go to Settings → Developer Settings → Personal Access Token → Tokens (classic) → click Generate token (classic)→ Fillup the form → Copy the generated Token, it will be something like ghp_sFhFsSHhTzMDreGRLjmks4Tzuzgthdvfsrta
git pull origingit add .git commit -m "Your commit message"git push originUsername for 'https://github.com' your_username
Password for 'https://your_username@github.com' : PAT(personal access token)
git loggit log --oneline