Archive

Posts Tagged ‘github’

Creating git alias


Most of the times, we spend considerable amount of time remembering and typing very lengthy git commands to execute a task

The easy solution for this is an alias mechanism provided by GIT.

In this post, I’ll mention an easy way to create and use git aliases

1. Creating aliases

Check for ~/.gitconfig in the home directory. This file usually contains the configuration related to git like user, name, email, template fields. In this file create one more field [alias]

For example if we open ~/.gitconfig it might be as follows

[core]
editor = vim
[user]
name = Vasanth Raja Chittampally

email = a@b.com

Now add an extra filed [alias] as follows


[core]
editor = vim
[user]
name = Vasanth Raja Chittampally

email = a@b.com

[alias]

Now under this alias filed we can specify the aliases we want.

For example I want to create an alias for “log –pretty=’%C(cyan) %h %C(Yellow) %an %C(red) %b’

I would probably add this as follows


[alias]

gp = log --pretty='%C(cyan) %h %C(Yellow) %an %C(red) %b'

2. Using aliases as git commands

Once alias is created we can use this alias name as a git command as follows

git gp <commit-id>

3. Add your own aliases ­čÖé

Categories: Technology Tags: , , ,

GitHub very useful way for sharing and improving your code


Recently I found a very useful online hosting service for software development. Github is the best platform to share and collaborate a free open source project. As of now github offers two different services one is paid version and the other is free for open source projects.

github is fairly simple and straight forward to setup and use. Very less prior knowledge of GIT is required. According to me github is the best way to showcase your skills and talents by making the projects open source. I encourage all graduates and undergraduates to use github, this gives a very good exposure to the version control system and encourages social coding.  Social coding could all together open up new set of opportunities. Happy coding!!

I’ve recently added a small repository just for practice purpose.

Categories: Uncategorized Tags: , ,