Learn and Discover Open Source with Daily Genuine Experience. From Coding, Design, Package Management Tweak to Desktop Customization.
 
   

If you are are coder, git is a must have tool that you should be familiar with, is git.

Git is a source code management tool created by Linus Torvald. This distributed version control system, manage your repository. It is fast, and also equipped with a lot of flexibility.

Using git is easy. It only takes a few commands. After a while, you have memorized the commands well.

Reading


Installing

In order to use git, you need to install git

In Arch, it is in extra repo.

 $ sudo pacman -S git

Installing Git in Arch Based Distribution


Github

There is a very popular free git website, github.com. Just sign up, and create a new repository.

I’m using git for my github.io site.

After create a new repository, github will give a short notification similar to mine below.

Just follow below step in your directory.

git init
git add README.md
git commit -m "first commit"
git remote add origin https://github.com/epsi-rns/dotfiles.git
git push -u origin master
…or push an existing repository from the command line

I have already prepared my local git Directory. So every git commands must be within this local directory.

 $ cd /media/Works/Development/github/epsi-rns.github.io/

Shell Command

For daily updating, all you need is this command

 $ git status
 $ git add --all
 $ git commit -m "your messages here"
 $ git push -u origin master

I use it over and over again. Exactly in that sequence.

Luckily linux shell can remember the command, so you don’t need to type it again and again.

For convenience, I like to use powerline to show master repo in my shell. You can see in this figure, it shown in right position of the shell.

Unfortunately bash doesn’t support this feature, so I use fish instead.

You can see git in action in this figure bbelow

Git Commands in Shell


Read The Fine Manual

RTFM as usual.

 $ man git
 $ man git-add
 $ man git-mv

After a while you will get bored with those basic commands, then you might want to try a more geeky command. Just read git oficial documentation.


Tagging

You can tag a specific point in your history, Here, is our recurring command.

 $ git tag -a 0.1 -m "First Tagging: Milestone 0.1"
 $ git push -u origin 0.1

Thank you for reading


Epsi Nurwijayadi bio photo
By Epsi Nurwijayadi