Adding files to Github repository via command line.

To add file to the github repository one must ensure one has git properly installed.Firstly we need to initialize an empty git repository from our command line:
git init
we need to add files to the staging area which we want to add to our github repository.
git add .  for adding all files to the staging area
git add filename for sending a particular file to the staging area
git commit -m “my first commit”
git push origin URLofTheGithubRepo Pushes the changes in your local repository to github.

Popular Posts