Sunday, November 30, 2014

Push changes to a remote repository using Git Bash

Push is the stage where the changes from the local repository get moved to the remote repository, once the changes are committed to the local repository push command will push the changes to the remote repository.

Changes in local working copy -> Stage -> Commit -> Push changes to remote repository

The following steps push the changes from the local repository to the remote repository using Git Bash commands

Committing changes to a local repository using Git Bash

Once the local changes in the working copy are staged/indexed, the next step is to commit the changes to the local repository this will move the changes from staging to the local repository.

Working Copy changes -> Stage/Index -> Commit to Local Repository -> Push to Remote Repository

Use the following steps to commit the changes from stage/index to the local repository

Staging changes using Git Bash

Staging changes using Git Bash 

Once the changes are done in the local working copy, they need to be staged/indexed, this will move the changes to the staging area, from here the changes should be committed to the local repository, and finally be pushed to the remote repository for other users to use the changes. 

Working copy -> Staging -> Commit to Local Repository -> Push to Remote Repository
Use the following steps to stage changes using Git Bash

Cloning a Remote Repository using Git Bash

Cloning a Remote Repository using Git Bash

The clone command can be used to cone a copy of the existing remote repository, alternatively you can also create a new repository all together using the “$ git init” command.

In this post we shall cone an existing repository, which resides in a remote machine. In my case the remote repository is hosted in BitBucket, you can clone any remote repository from the web like BitBucket, GitHub etc or from a local machine in the network.


Use the following steps to clone a remote repository using Git Bash

Getting started with Git GUI

Getting started with Git GUI

Before starting with Git GUI, make sure that you download and install the latest version of Git for Windows.

You can get the installation files from the below URL
Once installed, you can see Git UI & Git Bash added to your programs list as follows.

Getting started with Git Bash

Getting started with Git Bash

Before starting with Git Bash, make sure that you download and install the latest version of Git for Windows.

You can get the installation files from the below URL
http://msysgit.github.io/

Once installed, you can see Git UI & Git Bash added to your programs list as follows.

What is Git Bash?

What is Git Bash?

Git Bash is a command line interface through which we can interact with the Git version control system. Git Bash supports commands like cd which can be used to explore physical file locations in the local system and commands to operate on the underlying Git version control system.

Git Bash, is part of the Git for Windows installation, more details on Git for Windows can be found from the following site.

What is Git GUI?

What is Git GUI?

Git GUI is windows based interface through which we can interact with the Git version control system. Git GUI contains GUI based options to operate on Git.

Git GUI, is part of the Git for Windows installation, more details on Git for Windows can be found from the following site.

Thursday, November 27, 2014

Git Architecture

Git Architecture

Git maintains an architecture to control the file/repository versions, files can be modified in the local working folder staged (indexed) in the staging area before committing it to the local repository, later changes from the local repository will be pushed to the remote repository from where other users can get the changes.

We shall see about each of these stages and operations in detail in further posts.

The below diagram gives a picture of the various operations/stages involved in managing files in Git.

Advantages of Git

Advantages of Git

Git is a distributed version control and source control system, user to maintain versioning of documents and project source code. Unlike the conventional version control systems Git is a distributed version control system, hence is a lot different from the conventional systems like VSS, SVN etc.

Git has a lot of advantages when compared to the conventional version control systems, the following are the advantages of the Git version control system.

What is a Git

What is a Git?

Git is a distributed Version control and Source control system, a distributed version control system does not need a centralized repository / server. Each user has his own copy of the repository. Every user repository or local working directory is a full-fledged repository on its own and can manage the version control by its own without depending on a centralized server.

Distributed Version Control System

A version control system, also called revision control or source control system is a tool/system which is used to manage changes to a document, the system enables storing multiple versions of a document, the user can at any point in time go back and retrieve a specific version of the document which was saved in the past.

Commonly used version control systems

Commonly used version control systems.

A Version control system, also called revision control or source control system is a tool/system which is used to manage changes to a document, the system enables storing multiple versions of a document, the user can at any point in time go back and retrieve a specific version of the document which was saved in the past.

There are many Version control systems available in the market, some of them are free while a few others require a license, the following are some of the commonly used version control systems.

Features of a Version control system

Features of a Version control system

The main function of a version control system is to manage multiple versions of a document or code and make it available at any point in time, however version control systems provide many other features which enable sharing of a documents and code amount multiple users and still maintain the integrity of the code.

The following are some of the common features provided by a Version control system.

What is a Version Control System?

What is a Version Control System?

A version control system, also called revision control or Source control system is a tool/system which is used to manage changes to a document, the system enables storing multiple versions of a document, the user can at any point in time go back and retrieve a specific version of the document which was saved in the past.