GIT Client Setup and Configuration

From Hamara Wiki
Jump to: navigation, search

Describe GIT Client Setup and Configuration here.

Getting Started - Installing Git

Before you start using Git, you have to make it available on your computer. Even if it’s already installed, it’s probably a good idea to update to the latest version. You can either install it as a package or via another installer, or download the source code and compile it yourself.

Installing on Linux

If you want to install Git on Linux via a binary installer, you can generally do so through the basic package-management tool that comes with your distribution. If you’re on Fedora for example, you can use yum:

$ sudo yum install git

If you’re on a Debian-based distribution like Hamara Linux or Ubuntu, try apt-get:

$ sudo apt-get install git

Installing on Mac

There are several ways to install Git on a Mac. The easiest is probably to install the Xcode Command Line Tools. If you want a more up to date version, you can also install it via a binary installer. An OSX Git installer is maintained and available for download at the Git website, at http://git-scm.com/download/mac.

First-Time Git Setup

Now that you have Git on your system, you’ll want to do a few things to customize your Git environment. Your Identity The first thing you should do when you install Git is to set your user name and e-mail address. This is important because every Git commit uses this information, and it’s immutably baked into the commits you start creating:

$ git config --global user.name "Your Name"
$ git config --global user.email "Your e-mail"

HTTP Post Buffer Size

You may find the default post buffer of your git client is too small to push large deltas to Gitlab. Sometimes this can be observed on your client as hanging during a push. Other times it can be observed by git erroring out with a message like: error: RPC failed; result=52, HTTP code = 0.

This can be adjusted on your client by changing the default post buffer size:

git config --global http.postBuffer 524288000

Project Cloning and Setup

In order to start working on hamara project, you will first require valid user on remote repository. Anyone interested to contribute to project can ask for user creation by sending us email at hamara-devel@lists.hamaralinux.org or you can join us at IRC channel at following server details and ask for user creation.

Channel - #hamara
Server - irc.oftc.net

Members in IRC channel room may not be available all the time, Incase you do not find any member in IRC room, please feel free to send us email at hamara-devel@lists.hamaralinux.org . Login to repository with your user credentials and select hamara-packages repository. User can then fork hamara-packages repo and then clone it using HTTP protocol.

GIT Troubleshooting

Incase you are face any issues while cloning and push changes to remote repository, you can always send error details at hamara-devel@lists.hamaralinux.org .