Shortest way to commit a file to Github

Your first git commit

These are the steps to commit a file to Github using commands

  • create a repo on Github and copy it's url
  • make sure you uncheck "initialize this repo with read.me"
  • open git bash terminal
  • cd to the directory that contains the file you want to push to Github
  • Type "git init"

The following are the commands

git remote add origin <your created github repo>
git remote -v
git add <name of file>
git commit -m "write commit message here"
git push origin master
blog

copyright © 2021 Augustin Mbui all rights reserved