Camly - A Responsive Blogger Theme, Lets Take your blog to the next level.

This is an example of a Optin Form, you could edit this to put information about yourself.

This is an example of a Optin Form, you could edit this to put information about yourself or your site so readers know where you are coming from. Find out more...

Following are the some of the Advantages of Opt-in Form :-

  • Easy to Setup and use.
  • It Can Generate more email subscribers.
  • It’s beautiful on every screen size (try resizing your browser!)

Introduction to GIT!

I got an assignment to learn about GIT and therefore, in this post I will provide a basic introduction to GIT and encourage you to spend some time getting familiar with GIT.

So, What is GIT?

As wikipedia says, GIT is a widely used source code management system for software development. It is a distributed version control system that is widely used by a number of open source projects. At first, I will provide some definitions in order to make you familiar with GIT. We will start with Version Control System(or VCS). Version Control System is a system that tracks changes to a number of files over a period of time.
Repository(sometimes called 'Repo')  is the group of files that a VCS tracks. The basic use of VCS is that we can roll back to the earlier version of the file in the repository if the current version of the file isn't working or not responding. 
A distributed version control system (or DVCS) allows many software developers to work on a single project without requiring them to share a common network. As I said above, GIT is a distributed version control system. As I have said some basics, lets go to some specifics now.


You can install GIT from the official website of GIT.  
For linux: Add the command to install git. sudo apt-get install git-all


Once you have installed GIT in your system, you are ready to learn how to create repositories. In GIT, repositories are tied to directory, i.e., you can turn a directory into a repository. (But remember, you can't turn a subset of files into repository.)
So, to create a new repository, just create the directory where you want the repository to be stored and then just open the terminal window and navigate to that same directory. Once you're in the directory, just use git init to make the directory into your new repository. Simple, right? You can try it out. 


As GIT is a distributed version control system so it allows multiple users work together. The basis of this lies in cloning repositories. Cloning a GIT repository is super simple, you just need to use this command : git clone with the url (any github url). 
When we clone a GIT repository, a link back to the original remote is also created. You can see the link by running the command : git remote -v . 


So, now we have a repository. It's time to add files to the
repository so that you can track the changes in the file. You can 
create new files from scratch or just copy the files into the repository. Once the files are there, we need to add it to the Git
otherwise it will be treated as 'untracked files'.
 To make the file to be tracked, use the command : git add <file's path>
We will also use this command to add already tracked files that have been modified. 

Once we have used the git add command,now it's time to commit some changes in the repository. This can be done using the git commit command. When we use this commit command, we'll be prompted to enter what is called a commit message. It's a brief description of changes that are included in the commit. 

Once we have used the commit command, then the cycle begins again. We add new files, modify existing files, use git add command to make the files and changes to commit, and at last we commit them using the git commit command. 
To see the status of the repository we use the git status command. This command will tell us about the untracked files, modified files or the repository is clean. 
To see the difference made, we use the git diff command.  
To upload the changes made, we use the command git push and he other members of the group use the command git pull to see it. 
Often with GIT, we'll need to refer back to an earlier version of the project. We can do that by using git log command. When we type this command, we'll notice some outputs. 


In GIT, the commit we are currently working on is known as the HEAD commit. To see it, we use the git show HEAD command. 
Sometimes, it happens when you do a change but want to undo the change again. So, to undo that change in GIT, we use this command git checkout HEAD filename.

  • Free open source and binaries are available for almost all platforms.
  • It is decentralized, i.e., users keep a local clone, work locally at their own priority and pace and deliver their changes when ready.
  • It is fast, reliable and manages large history. 
These are just a few examples; I’m sure that as you experiment with Git you’ll find plenty of other uses for it.

1 comment: