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...
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...
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...
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...
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...
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...
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...
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 ...
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...
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...
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...
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 ...