Skip to content

Instantly share code, notes, and snippets.

@Ankita-Das
Last active July 21, 2025 07:41
Show Gist options
  • Select an option

  • Save Ankita-Das/5bd2ebe61f9bae00026d4f8a5bbeac72 to your computer and use it in GitHub Desktop.

Select an option

Save Ankita-Das/5bd2ebe61f9bae00026d4f8a5bbeac72 to your computer and use it in GitHub Desktop.
PushCommitUsingTerminal

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment