Git add interactively in staging area

Git is the most popular version control system now a days specially in agile development. Its makes a developer’s life much easier. It is different from its compitators like SVN because it has functionality of Staging Area Staging area provides the fexiblity to...

GIT Hooks

What is GIT Hooks. Git hooks are scripts those run automatically every time a specific event occurs in a Git repository. You can customize Git’s internal behavior and actions at key points in the development life cycle. Here i am going to describe how can we...

Edit an incorrect commit message in Git

Amending the commit message :- git commit --amend This command will open your editor, You can change the commit message of the most recent commit.Commit message can directly change from command line using below command :- git commit --amend -m "New commit...

Fetch most starred repository from github

Last week I worked a task to print most starred repositories and its last commit message. I want to share my experience with you. To achieve this I implemented an API named jcabi-github. Its an Object Oriented Github API which provide a solution to use github API in...

Setup your own git server using gitolite

In this blog I will going to provide the step to setup your own git server on Ubuntu. For doing the same we have to install the couple of package. Setup Git Using following command we can install Git sudo apt-get install git-core Create new user We can create a new...

Git Feature : Squash

Hi welcome. This blog is one of the git cool feature “Squash”. Note : Because this is an advance feature of git, I am expecting that you have basic knowledge of git like push, commit, checkout, branching etc. When we shall hear Squash first time, we would get three...

Useful Git Commands

Hi. I am back with a new blog post on some Useful Git commands. Recently I pulled the latest code of a branch and due to some bad commit I was not able to use certain feature. So, I needed a way to rollback to some previous version(commit) i.e. the point when the code...

git repository multiple remotes

In my previous project repository was hosted on github.com and application was supposed to deployed on heroku which was also provide a git repository. Every time I had to push code on main repository and after that same changes need to pushed on heroku git repo. I...

Update local GIT with remote deleted branches

Synchronize local GIT with remote deleted branches Branching is very useful and important feature of any version control system, specially when many developers are working on a single project. Github is one of the popular version control system. In this blog I am...

Tracking another repository in Git

Recently, I had to create few pull requests to other repositories and in order to do that I had to track the code on some repositories for updating my copy and finally publishing my changes to them. In such situation following steps/commands can help: Add the...