Git routine.

I did not know the git routine on linux so i chose the dark side. GitHub for Windows was of enormous help to get me started with GitHub and i was happily clicking away to commit and push for over a month. But the day had finally come for me to switch back to linux and learn how the git (command line) routine.

One starts off with generating an (unique) SSH key on your computer and adding this to your GitHub profile. Refer to this github help article to know how to generate said SSH keys and adding them.

NOTE: if the directory ~/.ssh does not exist, then create one. If you haven't used ssh on your system so far, there will not exist one.

Information about your git repository is available in the .git sub folder.

				
$ git clone/pull https://github.com/username/repository.git
# to download from a GitHub repository.
# Unlike git clone, using git pull also needs
# adding a remote (destination) as follows
# git remote add repo https://github.com/username/repository.git
# git remote to see the difference

$ git add .
# or git add folder/file* to specifically
# select folders/files to be staged for commit
$ git commit -m 'commit message'
# instead git commit -a -m 'commit message'
# that combines the above two.

$ git push (branch)
$ git status
$ git rm folder/file
# to remove a folder/file from the github repo.

$ git diff
# git diff HEAD
# git diff --staged to check the changes on the staged commit
$ git log
# to show commmits made