Showing posts with label GIT Tooling. Show all posts
Showing posts with label GIT Tooling. Show all posts

Thursday, 27 December 2018

GIT: Installation of the Git command line tooling

6.1. Ubuntu, Debian and derived systems

On Ubuntu and similar systems you can install the Git command line tool via the following command:
sudo apt-get install git

6.2. Fedora, Red Hat and derived systems

On Fedora, Red Hat and similar systems you can install the Git command line tool via the following command:
dnf install git

6.3. Other Linux systems

To install Git on other Linux distributions please check the documentation of your distribution. The following listing contains the commands for the most popular ones.
# Arch Linux
sudo pacman -S git

# Gentoo
sudo emerge -av git

# SUSE
sudo zypper install git

6.4. Windows

A Windows version of Git can be found on the Git download page. This website provides native installers for each operating system. The homepage of the Windows Git project is git for window.

6.5. Mac OS

The easiest way to install Git on a Mac is via the Git download page and to download and run the installer for Mac OS X.
Git is also installed by default with the Apple Developer Tools on Mac OS X.

GIT: Git tooling

5.1. The Git command line tools

The core Git development team provides tooling for the command line via the the git command. Without any arguments, this command lists its options and the most common commands. You can get help for a certain Git command via the help command online option followed by the command.
git help [command to get help for]
See all possible commands, use the git help --all command.
Git supports for several commands a short and a long version, similar to other Unix commands. The short version uses a single hyphen and the long version uses two hyphen. The following two commands are equivalent.
git commit -m "This is a message"

git commit --message "This is a message"

5.2. Separating parameters and file arguments in Git commands

The double hyphens (--) in Git separates out any references or other options from a path (usually file names). For example, HEAD has a special meaning in Git. Using double hyphens allows you to distinguish between looking at a file called HEAD from a Git commit reference called HEAD.
In case Git can determine the correct parameters and options automatically the double hyphens can be avoided.
# seeing the git log for the HEAD file
git log -- HEAD

# seeing the git log for the HEAD reference
git log HEAD --

# if there is no HEAD file you can use HEAD as commit reference
git log HEAD

5.3. Eclipse IDE

The Eclipse IDE provides excellent support for working with Git repositories.

5.4. Other graphical tools for Git

You can also use graphical tools.
See GUI Clients for an overview of other available tools. Graphical tools like Visual Studio Code, Netbeans or IntelliJ provide also integrated Git Tooling but are not covered in this description.