How to install git on SUSE

On SUSE, when you want to install git, execute “zypper in git“:

nanxiao:~ # zypper in git
Loading repository data...
Reading installed packages...
'git' not found in package names. Trying capabilities.
No provider of 'git' found.
Resolving package dependencies...

Nothing to do.

You should use “zypper in git-core“:

nanxiao:~ # zypper in git-core
Loading repository data...
Reading installed packages...
Resolving package dependencies...

The following 2 NEW packages are going to be installed:
  git-core perl-Error

2 new packages to install.
Overall download size: 3.2 MiB. Already cached: 0 B. After the operation, additional 19.5 MiB will be used.
......

Enjoy git now:

nanxiao:~ # git
usage: git [--version] [--help] [-C <path>] [-c name=value]
           [--exec-path[=<path>]] [--html-path] [--man-path] [--info-path]
           [-p|--paginate|--no-pager] [--no-replace-objects] [--bare]
           [--git-dir=<path>] [--work-tree=<path>] [--namespace=<name>]
           <command> [<args>]

The most commonly used git commands are:
......

 

7 thoughts on “How to install git on SUSE”

  1. # zypper install git-core
    Warning: No repositories defined. Operating only with the installed resolvables. Nothing can be installed.

  2. I get the following error, any diead why?

    $zypper install git
    Timeout exceeded when accessing ‘http://unifs01.clrcase.lab.emc.com/c4/sles/repo/SUSE/Products/SLE-SDK/12-SP3/x86_64/product/media.1/media’.

  3. I have ” SUSE Linux Enterprise Server 15 SP2″.
    I used URL to install git-core.
    But struggling to install git-lfs
    I am not able to find the pkg name or how to add repo that will have this.
    Can you pl help?

Leave a Reply to nanxiao Cancel reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.