Technology

Migrating a Git repository from one server to another.

Recently, I had to migrate one of the git repository from our local git server to Github along with all the branches, tags etc. Since ours is a big project and with many branches, adding second remote and pushing master branch was not an option. And with Git it's a very simple three step process. 1) Clone bare structure of an existing...

by Hitesh Bhatia
Tag: git
18-Sep-2012

Technology

Using Git Rebase

Working on a cool project, doing cool and unusual stuff has its own charms and challenges. For doing cool things, you need cool tools to play with and Git surely is one of the coolest ones around. One of the many powerful features of git is rebase. While working on a large project, you almost always develop your feature on a new...

by Sachin
Tag: git
22-Jan-2012

Grails

Creating GIT Alias

Since Git is awesome. It also provides functionality of making aliases. Example [shell]git config --global alias.co checkout [/shell] Here we created co as an alias for checkout (All the aliases that are created goes into .gitconfig file under home folder). Now to checkout a branch named testBranch, We can also write [shell]git...

by Hitesh Bhatia
Tag: git
30-Dec-2011

Grails

GIT Maintenance

Since we use git numerous times a day over and over, hence needs maintenance. There are few commands that will help you to keep our git healthy. If you feel that you git has somewhat slowed down, these would do the trick for you. Since ours is a pretty big project . I run it once a week to make sure my git is healthy. 1.git fsck ...

by Hitesh Bhatia
Tag: git
30-Dec-2011

Grails

Git – How to Change Master Branch

While working on Git with a big team, there are chances that a situation might arise when you want to set some other branch as master branch.Recently we were in a same situation. Several of branches were merged to master branch. And unfortunately one of the branches merged was created from an unstable branch. Making our master branch...

by Hitesh Bhatia
Tag: git
29-Aug-2011

Technology

Using git diff feature on Github

Hi Folks, Recently I came across a cool way to compare differences between two branches, two tags, or between two commits on Github. Many a times in our project we have to thoroughly see what has been a specific change in the code base before we push it on our production branch. Here is how you can view the differences in commits: On...

by Abhishek Tejpaul
Tag: git
07-Jun-2011

Grails

git branching model: choose branches for deletion – see whats remaining for the merge

This post is for people who are already familiar with Git and work on multiple branches (esp. feature branches). By practice, feature branches are the branches created from a root branch (master or any other as per your branching model) and once feature is complete/tested - they are merged back into the same root branch. Working in...

by Salil
Tag: git
04-Mar-2011

Technology

GIT –pretty

git log is one of most useful commands to see information about commit , author , date and subject(comment)  while using GIT.This displays information in blocks and hardly 5 - 7 can be listed on normal screen size. But git provides --pretty option , so that we can format the output of git log; Here are some ways to do that ...

by Hitesh Bhatia
Tag: git
18-Feb-2011

Technology

GIT … Lighten up a Bit

Hello there .. Writing my first blog , I am still amazed by the effectiveness of working with Git . No matter how many times you mess up.. you can  still end up with a Clean Working directory. (Believe me .. ;)  ) .  I have also heard about the frustrating merge situations people have been in .. but I guess it has more to do with...

by Manoj Mohan
Tag: git
15-Feb-2011

Technology

Git – Grep

Still in my early days of using Git. Recently just to make sure that I have merged two branches  and have pushed changes to QA server successfully,I often used command "find | xargs grep" .But to deal with this kind of situations Git provides "grep" command. Just as name suggests this commands searches for regex pattern passed to it. ...

by Hitesh Bhatia
Tag: git
22-Jan-2011

Technology

Fetching an old deleted file of a project using Git

Recently in one of my projects, I had to bring the content of old-forgotten-deleted file back to the application code base using Git. The problem took a 'fancy' turn as the path to the file was no more a valid path in Git as there had been a major refactorings in our project esp. renaming of the packages as well as the folder structure...

by Abhishek Tejpaul
Tag: git
15-Nov-2010

Technology

Creating a New Git Branch on the Local Machine and Pushing it to a Remote

Our project went into production a few weeks back and was on Grails 1.3.1. Since the code was stable, we decided that it was time to upgrade to grails 1.3.4. However, we didn't want to push it straight to the QA Server or Production server because that would've meant that the maintenance of the existing production code would become a...

by Vivek Krishna
Tag: git
09-Sep-2010