Showing posts with label git setup. Show all posts
Showing posts with label git setup. Show all posts

Welcome to GIT - revisited

Hello,

Git is getting more popular and it's really good. So here is a quick introduction how to get started with it.

First step is to install the tool - you can download it from the official website:
https://git-scm.com/downloads

There are versions for many different OS such as Linux, Windows, Mac OS X and Solaris.

After installing it you should be able to open GIT bash where the fun begins :)

Set your user details such as name and e-mail - this will appear in the commits.
git config --global user.name <your_username>
git config --global user.email <your_email>


It's good to have nice merge tool. There are some supporting 3-way diffs and some usual 2-way diffs. Two of them are worth recommending at this point:


Once you choose your favourite you can set it up for Git using the following command:
git config --global diff.tool <your_diff_tool>

If you want to display the list of config settings use the command:
git config --list

Before you can start working with Git you should also set up your SSH keys. Follow our guide for setting them up:


Most common way of using Git is using the command line via Git Bash tool - and most of the users are OK with it. However there are some users who prefer graphic user interface - so good news is there are GUI tools for Git. Some of them are integrated in the development IDE such as for example Eclipse or NetBeans.
You can also install the dedicated tool such as for example:



That's it basically. Cheers!


GIT setup: basic configuration

Hola!

After installing Git client it's ready to use right away. However there are few things you may want to consider setting up. Those are things like for example user name and e-mail address.

You can display current config values with the following command:
$ git config --list

Important Note
When setting configuration parameters you can set it either as global or local value. By default you are setting the local value. By using --global param it will be set-up globally which means it will be used for all of your projects unless overridden by a local setting.


Setting user name
$ git config --global user.name "xuser"
$ git config user.name "xuser"

Setting e-mail

$ git config --global user.email xuser@example.com
$ git config user.email xuser@example.com



That's it.