Wednesday, 17 July 2019

Git installation and basic commands

Installing Git :
        To use features of Git; It should installed on your computer.
You can check if "Git" is already installed on your computer or not by "git --version" command (for Linux and macOS). Windows users can check it in Programs and Features.

        If "Git" is not installed; then you can install it from its official website.



 Setting user's identity :
       When you install Git on your computer; the first thing you should do is setting your identity (name and email). The git config command is used to set user's name and email.
       To set name and email; following commands are used :

git config --global user.name "Ajay Salunkhe" 
git config --global user.email "mail2ajaysalunkhe123@gmail.com"

        To view the configuration following command is used : 

git config --list

          For every git commit users identity is stored along with it.

Monday, 15 July 2019

Introduction to GitHub

GitHub :
        Firstly Git and GitHub are not the same things. As discussed in the previous blog post  "Git is a tool for managing project locally whereas GitHub is a repository hosting service for your project."
        like GitHub, we also have other Git hosting services like GitLab, BitBucket, etc.
        With GitHub, we can store our project (repositories containing source code files) online so that anyone can see and make changes in the project to improve the project.
        GitHub allows other developers (collaborators) to contribute to the project, even if they are not physically at the same place.
        For more info read GitHub on Wikipedia.

Steps to create a repository on GitHub :
  1. Sign up on https://github.com/
  2. Choose a plan (I prefer to choose a free plan).
  3. Login to GitHub
  4. Click on "New" button.
  5. Provide name for your repository and click on "Create Repository".
  6. You successfully created repository on GitHub.
Click on image to view in full size.


Tuesday, 9 July 2019

Introduction to Git

Necessity is the mother of invention.
The need for "Distributed Version Control System" for the development of the Linux Kernel made Linus Torvalds to develop Git.

What is Git :
        In a single line, we can define Git as a "Distributed Version Control System".
        A version control system is a tool that tracks changes made in the files over a period of time.
        Git helps us to track changes made in files. when we add a file or modify an existing file ( to a directory which is being tracked by Git ), Git helps us to determine - part of a file changed, a person who changed it, and with commit message why it was changed.

Version control systems used earlier :

        I remember when I was in my bachelor Degree (BCS), I used to create "folders" for maintaining all the important source code files of the project. I used to give names to the folders like - "Web Project",  "Web Project New",  "Web Project New 1",  "Web Project New 2" and so on.
        Mine method for version control is very common. For every new version, I used to copy the whole folder and makes changes in the newly created folder.  But this method was not so good, because as project size increases its hard to manage the project and also my friends cannot contribute to my project. this method of copying files into another directory (folder) can be termed as "Local Version Control System".
        When a project is large & requires more than one developer to work on a project; then the project needs to be stored centrally. when a project is on a centralized server then all development team can work (collaborate) on a project. Also, a centralized server contains all versioned files, so any developer can check out files from here. this method of having a "centralized server" for working together on a project can be termed as "Centralized Version Control System".
    But a Centralized Version Control System also has the following serious downsides :
    - If the centralized server goes down for a certain period of time then during that time nobody can work on a project.
    - If the hard disk of the central database is corrupted & proper backups haven't been kept then you will lose the whole project.
    Disadvantages of "Centralized Version Control System" is overcome by "Distributed Version Control System".
        In "Distributed Version Control System" all the data (files) is kept on each collaborators machine. so even if the central server gets corrupted then all the data can be retrieved from another machine (from the machine who is collaborating on the same project).

Advantages of Git :
    Speed: Most of the Git operations are performed locally on the computer without the need of internet. Internet is only needed when we want to collaborate with team & for storing versions in a centralized server.
    Free and Open Source: Git is free to use for managing your project without paying a single rupee. Git is "Open Source" means you can modify Git source code according to your requirements.
    Security: Git guarantees that it's impossible to change its content of any file or directory without Git knowing about it. The mechanism that Git uses to provide such integrity is "SHA-1 Hash".
    Backup: Files of a project on every collaborator's machine, hence it can be used for recovery of data. The chances of losing data are very rare.

Cryptocurrency and Bitcoin


    The terms cryptocurrency and bitcoin came existence in 2009. The first decentralized cryptocurrency is said to be created by a Japanese person under the name Satoshi Nakamoto (There is no proof on either he/she is one person or group of persons).
    As the name suggests, the term Cryptocurrency is a combination of the two words crypto and currency. we all know about currency and word crypto is for cryptography.
    Cryptography is the branch of computer science which deals with encryption, decryption, security and all other secret stuff. In simple words, Cryptocurrencies are digital, decentralized currencies which are validated, stored & encrypted/decrypted using a technology called "Blockchain".
    Bitcoin is one of the type of cryptocurrency among many like Ethereum, Litecoin, Ripple, etc. now let us know the difference between Bitcoin cryptocurrency and our regular paper currency (also called as Fiat currency). when we make any transaction with Fiat money then the transaction is governed by a central authority like banks but cryptocurrency doesn't have central body (it's decentralized), here Blockchain technology stores all transactions publically in the network known as "Distributed Public Ledger".
    Bitcoins are legal in many countries like China,  Japan, Russia, USA, Australia & also accepted by popular billion dollar companies like Microsoft, Dell, Reddit, Paypal, etc.
    Is Bitcoin legal in India? According to RBI (reference: https://rbi.org.in/Scripts/BS_PressReleaseDisplay.aspx?prid=43574), there is no ban on Bitcoin & RBI doesn't declare it as illegal currency. In India, there are many Bitcoin wallets which allows us to store and trade Bitcoins like Zebpay, Unocoin, Coinsecure, Mycelium, etc.
    Cryptocurrencies like Bitcoin will be the biggest revolution in the finance industry. Famous people like Bill Gates, Richard Branson, Peter Thiel and many more also taught that it will be the future of currency in the fastest changing technological world.