Category Archives: git

Updating your Fork hosts a large number of open source repositories. You can often fork these repositories, however keeping the fork updated with the master¬†can be challenging. Here are some steps you can do to update your fork with the master. The below assumes you are in your local fork directory.¬†Also, the branch from the master is called ‘develop’, if it is something else, then use that branch name instead of ‘develop’. I am using the SaltStack repo as an example.

$ git remote -v
$ git remote add upstream
$ git remote -v
$ git fetch upstream
$ git checkout develop
$ git merge upstream/develop
$ git push

Git on CentOS

Git is very popular source code management (SCM) system. It has replaced SVN as the preferred choice of coders. In this brief tutorial I will show you how to setup Git on your CentOS box, and start using it. First, install Git from source code, primarily because if you install from the yum repos you might get an older version. Git requires the following packages:

sudo yum install curl-devel expat-devel gettext-devel openssl-devel zlib-devel -y

I already had a previous version of Git installed, so I was able to download Git source using Git. If you do not have Git installed, then you can install it using ‘sudo yum install git -y’.

git clone

Uninstall the old version of git, so that you can use the new version which you will build below.

sudo remove git -y

Now install some tools needed to make git:

sudo yum install make -y
sudo yum install gcc -y
sudo yum install cpan -y 
sudo yum install perl-DBI perl-DBD-MySQL -y #For MakeMaker

We are now ready to actually install Git, which is done as follows:

sudo make prefix=/usr/local all
sudo make prefix=/usr/local install

Now that you have Git installed, visit and create your free account. After that create a repo on using the steps here Next in your shell we will clone the above repo and create a file in it.

mkdir -p git && cd git
git config --global "syedaali"
git config --global ""
git config --global credential.helper cache
git config --global credential.helper 'cache --timeout=7200'
git clone
cd perlex
touch README
git add README
git commit -m "Adding README"
git push

Using git config I specified my username which I had created on I also specified that git should cache my credentials for 7200 seconds, so that I do not have to enter my username and password repeatedly. On I had created a repo called perlex.git, I cloned that using the ‘git clone’ command. After that I created a file called README, committed it to my local repo and then pushed it to the remote repo. For further reading visit