Posts

Showing posts from May, 2015

Creating a Repository and committing the changes

In git you would need to initialize a Repository first which would be empty at the start point. We are going to create a test directory and initialize the directory as our git Repository ~ $ mkdir test ~ $ cd test/ ~/test $ git init Initialized empty Git repository in /root/test/.git/ Initializing a directory creates a subdirectory of .git which includes files used by git to track the changes ~/test $ cd .git/ ~/test/.git $ ll total 32 drwxr-xr-x. 2 root root 4096 May  1 20:11 branches -rw-r--r--. 1 root root   92 May  1 20:11 config -rw-r--r--. 1 root root   73 May  1 20:11 description -rw-r--r--. 1 root root   23 May  1 20:11 HEAD drwxr-xr-x. 2 root root 4096 May  1 20:11 hooks drwxr-xr-x. 2 root root 4096 May  1 20:11 info drwxr-xr-x. 4 root root 4096 May  1 20:11 objects drwxr-xr-x. 4 root root 4096 May  1 20:11 refs If we are going to check in the test directory , the git will show there is nothing to co...

Git Installation and Basic configuration

You can simply install git using the yum # yum install git It will resolve the dependencies for you mostly comprising of the perl which git actually uses and will install the git. Next configure a global username and email id ~ $ git config --global user.name "Root User" ~ $ git config --global user.email "root@localhost" This would actually create an .gitconfig file which will hold your details ~ $ ls -ltr .gitconfig -rw-r--r--. 1 root root 49 May  1 17:35 .gitconfig ~ $ pwd /root ~ $ cat .gitconfig [user]         name = Root User         email = root@localhost You may also list the details using the following command ~ $ git config --list user.name=Root User user.email=root@localhost Git is designed to take the parameters locally and globally , so you may set additional parameters and can even set the same parameters to have different value both locally and globally $ git config --system system.name "Git Repo...

Common Source Tasks in Git

Initialization: Creating the Empty repository for use. Repository are much like the Linux Repos which contain all the source or version control files and directories. So it is necessary to initialize a Empty Repository where you can important all the stuffs and files into. Clone: Making a local full copy of a repository on your workstation. Where you can further work and create further branch or manipulate or add the functionality as per your requirement. Checking out: Locking a copy of one or more files for exclusive use. Though it is not mostly used , it was essentially used in the visualsource or perforce, it was done to make sure no one else can make changes which may either conflict or overwrite your changes. Checking out not commonly done today and there are other better way to achieve it. Branching: Allowing a set of files to be developed concurrently and at different speeds for different reasons.It allows to attain different functionality. Merging: Taking differen...

Understanding Version Control and Available Version Control Softwares

What is Version control It is a method used to keep a software system that can consist of many versions and configurations , well organized. Why Version control Usually through a period of the software development we might have various versions of software, code updates, hot fixes, bug fixes which all are revised over a period of time but we need to maintain the version and keep all the version intact so we might refrence them back over a period of time. Also in case of a problem with an updaded version of a software , we can always revert back to the older version easily using the version control software. All these things can easily be achieved using th version control software. There are large number of version control softwares 1. CVS: Kind of origin of source control 2. PVCS: Commercialized CVS 3. Subversion : inspired by CVS 4. Perforce : It is a commercial, proprietary revision control system developed by Perforce Software, Inc. 5. Microsoft visual sourcesafe:- M...