sudo apt update
sudo apt install git
git config --global user.name "Your Name"
git config --global user.email "[email protected]"
cd /path/to/your/files
git init
git add .
git commit -m "Initial commit"
- Create a repository in your github manually and copy the link of this repository
git remote add origin ENTER_YOUR_GITHUB_REPO_LINK_HERE
YOU NEED TO DO THE BELOW PROCESS ONLY ONE TIME, ALSO MAKE SURE TO SAVE THE GENERATED KEY IN SOMEWHERE ELSE
- Now visit This Link (If it ask password, then provide password)
- In the
Note
section write anything - In the
Select scopes
sections selectrepo
section and then click on Generate token - Copy that token, this token will be used as passoword during github files upload
git branch -M main
git push -u origin main
- It will ask your
github username
andgithub password
but in thepassword
section u need to pastethe generated token
you copied earlier - Done !!