Technology

Why are atomic commits a best practice in Git?

Atomic means all or nothing - either everything succeeds or all fails. Git is known to have atomic operations i.e. an environment issue will not cause git to commit half of the files into the repository and leave the rest. So what are we doing talking about atomic commits when all operations are already atomic in git? When we talk...

by Aseem Bansal
Tag: git
15-Feb-2015

AWS

AWS CodeCommit

Amazon has come up with loads of eye-popping services that reduces our workload in re:invent 2014, one such astounding service that it has launched on Day 1 of re:invent is CodeCommit. We've been investing loads of our time in managing our own source control system,  which can be reduced by using CodeCommit. It's a secured service...

by Tejprakash Sharma
Tag: git
14-Nov-2014

Grails

Grails ‘integrate-with’ command

While reading the Grails docs I came across a useful Grails command i.e. integrate-with. In this short blog I just want to present some of the uses of this command. By using this command we can create Git's .gitignore file: [java] grails integrate-with --git [/java] The above command will create a .gitignore file in the root of...

28-Apr-2014

AWS

Automating deployment of a static website hosted on Amazon S3

Most of us know how to host a static website on Amazon S3, but to deploy the website you would need to run the AWS Cli command everytime manually. In this blog I'll show you how to automatically deploy your website while maintaining version control of your project using server side hook provided by Git. Prerequisite : Git Aws...

by ravi
Tag: git
25-Feb-2014

Technology

Modify promt to make it GIT specific.

We use git a lot, and one of the most used commands is "git branch". Few Months back we found a script that enabled us to modify our prompt so that it shows our current branch. We have modified it further to add extra functionality, and our modified script enables prompt to show number of files modified, number untracked files, and also...

by Hitesh Bhatia
Tag: git
24-Sep-2012

Technology

Git Bisect : Find that DAMN Commit!!!

While working on a project with a team, there is a chance that once in a while erroneous pieces of code (bad programming, wrong conflict resolution etc) creep in. Now wading thorugh individual commits looking for a specific line in a file that looks suspicious can be hard work and takes a lot of time. I was in one of these...

by Manoj Mohan
Tag: git
24-Sep-2012

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