Inside the folder that you want to commit :
git init
git remote add origin https://github.com/Ankita-Das/
git add .
git commit -m "Initial commit"
git branch -M main
git pull --rebase origin main (for pulling whatever changes are already in there git repository, before pushing the commit)
git push -u origin main
Password based authentication is not allowed nowadays, instead token based authentication.
Ensure that these permissions are granted to the token.
1.The token should have access to the repo you are trying to commit to.
2.Read access to metadata
3.Read and Write access to actions, administration, code, codespaces, commit statuses, deployments, and pull requests