Git or Gitlab or Github 
Git was initially idea and designed & developed by Linus Torvalds(linux creator and devloper,few people called linux guru).GIT is a distributed version control system and source code management (SCM) system with an emphasis to handle small and large projects with speed and efficiency.GIT is so fast compare to other scm's and ‘C’ language makes this possible by reducing the overhead of runtimes associated with higher languages.Git is a free software.

GIT (Version Control Syatem) Version Control System (VCS) is a software that helps software developers to work together and maintain a complete history of their work.
GIT (Version Control Syatem)VCS:
- Allows developers to work simultaneously.
- Does not allow overwriting each other’s changes.
- Maintains a history of every version.

Git versions
2.4 2.4.11
2.5 2.5.5
2.6 2.6.6
2.7 2.7.4
2.8 2.8.4
2.9 2.9.3
2.10 2.10.2
2.11
2.11.1 2017-02-02 (latest)
2.12 2017-02-24 (latest)
2.12.2 2017-03-24 (latest release)

**********************************************************************************************
Note:- Git preparation found doubts or encounter any issues feel free REACH US or CONTACT US.
Git related questions and clarificatiosns feel free POST to DISCUSSION FORUM.
**********************************************************************************************

Version Control tools
CVS 
SVN 
GIT or Gitlab or GitHub (all the companies migrated to Git)
Mercurial
Bazaar

CVS -Computer Vision Syndrome or System Concurrent Versions System (CVS) is a program that lets a code developer save and retrieve different development versions of source code . It also lets a team of developers share control of different versions of files in a common repository of files.

Mercurial- Mercurial is a free, distributed source control management tool. It efficiently handles projects of any size and offers an easy.

SVN - Apache Subversion (its command name svn) is a software versioning and revision control system distributed as open source under the Apache License. Software developers use Subversion to maintain current and historical versions of files such as source code, web pages and documentation.

Bazaar -Bazaar GNU (Bazaar-NG, command line tool 'bzr') is a distributed and client–server revision control system sponsored by Canonical.Bazaar is free software and part of the GNU Project.

GIT or Gitlab or GitHub (all the companies migrated to Git)

Prerequisites
Git support all os platforms (windows & linux,mac etc..)Git to handle all levels of Java and nonJava projects. So it will be good if you have some amount of exposure to software development life cycle and working knowledge of developing webbased and non-web-based applications.

Git Adnatages

Free and open source.
simpale setup(No need of powerful hardware).
simple or Easier branching.
Local Repository.
Fast and small.
Implicit backup;
Security (cryptographic hash -secure hash functionality helps deployment effectively).

Git Disadnatages

Images from websites or other imgs,MS Office docs-some slowness issues.

Many commands with many options, few or some commands are non-intuitive and need a level of understanding the internals of git.

Install GIT on ubuntu or Install GIT on Linux-

install Git using apt-get:

$ sudo apt-get update
$ sudo apt-get install git
Verify the installation  - git --version:

$ git --version
git version git version 2.7.4

Configure your Git username and email 
git config --global user.email"user@mail.com"
git config --global user.name"username"

$ git config --global user.name "username"
$ git config --global user.email "username@*****.com"
Git packages  available  yum and dnf 

Install Git using dnf (yum,older versions of Fedora)

$ sudo dnf install git or $ sudo yum install git
Verify the installation  git --version:

$ git --version
 git version 2.7.4
Configure your Git username and email
git config --global user.email"user@mail.com"
git config --global user.name"username"

$ git config --global user.name "username"
$ git config --global user.email "username@*****.com"

Debian/Ubuntu Environment

Git requires the several dependencies to build on Linux
First install the necessary dependencies using apt-get

$ sudo apt-get update
$ sudo apt-get install libexpat1-dev gettext libz-dev libssl-dev asciidoc libcurl4-gnutls*
Note- check out the google if you need latest dependencies.

$ sudo yum install epel-release
$ sudo yum install  gettext-devel openssl-* curl-devel expat-* lib-devel perl-devel  
follow the same like above steps

$ git --version
git version 2.7.4 

Git - Mac Installer or Install GIT OS X

Easiest way to install Git on a Mac is via the stand-alone installer

Download the latest Git for Mac installer

Open a terminal and verify the installation check git --version:

$ git --version
 git version 2.7.4

Configure your Git username and email
git config --global user.email"user@mail.com"
git config --global user.name"username"

$ git config --global user.name "username"
$ git config --global user.email "username@*****.com"

$ sudo port selfupdate
Search for the latest available Git ports and variants

$ port search git
$ port variants git
Install Git with bash completion, the OS X keychain helper and the docs

$ sudo port install git +bash_completion+credential_osxkeychain+doc
if any error check the latest or old version depencencies
Configure your Git username and email using the following commands, replacing Emma's name with your own. 

Configure your Git username and email
git config --global user.email"user@mail.com"
git config --global user.name"username"

$ git config --global user.name "username"
$ git config --global user.email "username@*****.com"

$ xcode-select --install
Install Homebrew.
Using Homebrew, install openssl:

$ brew install openssl
Clone the Git source (or if you don't yet have a version of Git installed, download and extract it):

Install Git on Windows

Git for Windows stand-alone installer

Download the latest Git for Windows installer.

When you've successfully started the installer, Check the Git Setup wizard screen.
Open a Command Prompt (or Git Bash if during installation you elected not to use Git from the Windows Command Prompt).

Run the following commands to configure your Git username and email
Configure your Git username and email
git config --global user.email"user@mail.com"

$ git config --global user.name "username"
$ git config --global user.email "username@*****.com"

********************************************************************************************************************
Note:- While installing Git preparation found any doubts or encounter any issues feel free - REACH US or CONTACT US.
Git related questions and clarificatiosns feel free  to POST-DISCUSSION FORUM.
********************************************************************************************************************
Git commands or Git practice or Git working process

Git basic commands or Git basics

current directory a Git repository we simply run init.

$pwd

$git init

make a new directory that is a Git repository we just specify a directory

ex- $git init mynewrepo   or
 $git initmyrepo


Add File or Adding New Files
we have a repository mynewrepo or myrepo,but nothing in it empty.You can add files with the "add" command
$git add filename   (single file)

$git add .   (all files)
-files in preparation for versioning (still your files not in repo now staging area)

Need more info cehck 
 $git diff  or $git diff --staged

commit file or Committing a Version

$git commit -m "your message"

ex-  $git commit -m "Adding files"

Edit File or Editing Files

$git status

You have made or edit changes to some files,"git status" to see what will happen on commit.you will notice a list of modified files, and a message 
no changes added to commit (use "git add" and/or "git commit -a")
Git commit will do nothing unless you explicitly add files to the commit with git add. You're looking for the commit command to automatically commit local modifications we use the "-a" flag.

$git commit -a -m "Edited ot Changed some files"

Certain files or  specific files.

$git commit -m " Edited or change some files" myfile1 file2

$git add test_file   (add multiple files also)
$git add test_file test_file1 test_file2

$git status 
output something like this-

# On branch master
# Changes not staged for commit:
#   (use "git add <file>..." to update what will be committed)
#   (use "git checkout -- <file>..." to discard changes in working directory)
#
#   modified:   test_file test_file1 test_file2
#
no changes added to commit (use "git add" and/or "git commit -a") $git commit -m, $git commit -a -m

$git log

output

commit fa3c1411aa09441695a9e645d4371e8d749da1dc
Author: username <username@******.com>
Date:   Wed Mar 9 10:27:54 2011 -0500

    Added test_file test_file1 

commit 8c3228730ed03116815a5cc682e8105e7d981928
Author:  username <username@******.com>
Date:   Wed Mar 9 10:27:54 2011 -0500

    Added test_file test_file2

commit 43628f779cb333dd30d78186499f93638107f70b
Author:  username <username@******.com>
Date:   Wed Mar 9 10:27:54 2011 -0500

    Added test_file2

commit 911e8c91caeab8d30ad16d56746cbd6eef72dc4c
Author: username3 <username3@******.com>
Date:   Wed Mar 9 10:27:54 2011 -0500

    First Commit

$git-log instruction (usefull troubleshoot time)

git log --pretty=oneline --max-count=3
git log --pretty=oneline --since='4 minutes ago'
git log --pretty=oneline --until='3 minutes ago'
git log --pretty=oneline --author=<username>
git log --pretty=oneline --all






























































Comments