Starting with Git and Github27 May 2016
Or as I like to call it a joke. Why? Trivia :
git is British slang for a dumb, annoying, or generally unpleasant person. The joke is that Linus Torvalds (Linux creator) names his projects after himself, so he chose
git as the name of the SCM he made.
We are so deep into using it that we almost cannot imagine how collabaration worked before it. It is not a language and obviously not a rut. If someone understands
version control, he would explain it as the magical entity that takes the best out of a group of dishes and presents to you the perfect blend of taste.
Building softwares is one of the complex things humans do. Collaboration is another one. Git combines both of these and yet eases it out. Perfect contradiction to common sense.
Here is a list of commands that are at the heart of git:
git init Initialise a local git repository, or start a project which you want to use with git support.
git clone Create a working copy of a project that exists locally or otherwise.
git commit Commit(Save) changes to a repository(directory) as git knows it.
git add Git uses a stage to index files. Thus when commiting or making any other changes everything needs to be on the stage. This keeps it clean.
git push There exists a temporary copy of the product on which you work. When you are done, you may push the changes to the main copy.
git checkout Git users generally prefer to work on branches. Other than that, git has some standard branches that are used for specific purposes, for example the gh-pages branch is used for github pages.
When you are up to such stuff, you may end up doing mistakes, something like staging things you didn’t want to, and other things. Remeber our good old friend
Cntrl+Z. Well git has a shadow of it right here :
git reset --hard. Just like the undo command, don’t use it too much.
Github, is the google drive of almost all major OpenSource (and some private) projects, with obvious git support. It deserves much more than a simple blog post. Here is what a github repository page looks like:
Now there is a lot going on in here. I can explain a few things, which would bake the cake but for the icing one needs to use it more and more.
Fork here refers to creating a copy of the project in your own zone on which you can work as you like. Fork are generally created to create a well documented series of changes when you create a pull request automatically which can be reviewed later on. What is a pull request? As the name suggests, it is a request you make to the owner of the project to go through your changes and incorporate them. If you get one merged you probably did the right thing.
Star are basically what Add friend and Follow is on facebook.
When you think of forking a repository make sure you go through some of the issues listed.
Issues lists out bugs that people find while using the project, enhancements that the project might do good with, additions or any other suggestions. If you have problem starting up, have a look here
I would soon be writing a detailed blog on use of Git and Github and also how to contribute to open soure. Thank you for reading!