Skip to content

Instantly share code, notes, and snippets.

@bbevan
Created September 13, 2018 14:27
Show Gist options
  • Select an option

  • Save bbevan/932ffe0a34d3a925ce35807ff91da6c2 to your computer and use it in GitHub Desktop.

Select an option

Save bbevan/932ffe0a34d3a925ce35807ff91da6c2 to your computer and use it in GitHub Desktop.

How to Install Git on openSUSE-leap 15.0

One simple command

sudo zypper install git

Watch what happens...

brandon@linux-3sb5:~> sudo zypper install git
[sudo] password for root: 
Loading repository data...
Reading installed packages...
Resolving package dependencies...

The following 26 NEW packages are going to be installed:
  bash-completion-devel cvs cvsps git git-core git-cvs git-email git-gui gitk git-svn
  libapr1 libapr-util1 libpcre2-8-0 libserf-1-1 libsha1detectcoll1
  libsvn_auth_kwallet-1-0 libutf8proc2 perl-Authen-SASL perl-DBD-SQLite perl-DBI
  perl-Digest-HMAC perl-Error perl-Net-SMTP-SSL subversion subversion-bash-completion
  subversion-perl

The following 8 recommended packages were automatically selected:
  git-cvs git-email git-gui gitk git-svn perl-Authen-SASL perl-Net-SMTP-SSL
  subversion-bash-completion

The following 2 packages are suggested, but will not be installed:
  git-daemon git-web

26 new packages to install.
Overall download size: 13.2 MiB. Already cached: 0 B. After the operation, additional
54.7 MiB will be used.
Continue? [y/n/...? shows all options] (y): y
Retrieving package bash-completion-devel-2.7-lp150.2.3.noarch
                                                  (1/26),  31.3 KiB (  292   B unpacked)
Retrieving: bash-completion-devel-2.7-lp150.2.3.noarch.rpm .........[done (137.0 KiB/s)]
Retrieving package cvs-1.12.12-lp150.1.9.x86_64   (2/26), 404.7 KiB (962.5 KiB unpacked)
Retrieving: cvs-1.12.12-lp150.1.9.x86_64.rpm .....................................[done]
Retrieving package cvsps-2.1-lp150.1.3.x86_64     (3/26),  62.9 KiB (128.6 KiB unpacked)
Retrieving: cvsps-2.1-lp150.1.3.x86_64.rpm .......................................[done]
Retrieving package libapr1-1.6.3-lp150.1.1.x86_64 (4/26), 114.6 KiB (244.5 KiB unpacked)
Retrieving: libapr1-1.6.3-lp150.1.1.x86_64.rpm .......................[done (1.0 KiB/s)]
Retrieving package libpcre2-8-0-10.31-lp150.1.3.x86_64
                                                  (5/26), 235.5 KiB (648.1 KiB unpacked)
Retrieving: libpcre2-8-0-10.31-lp150.1.3.x86_64.rpm ..............................[done]
Retrieving package libsha1detectcoll1-1.0.3-lp150.2.2.x86_64
                                                  (6/26),  23.2 KiB ( 45.8 KiB unpacked)
Retrieving: libsha1detectcoll1-1.0.3-lp150.2.2.x86_64.rpm ...........[done (15.0 KiB/s)]
Retrieving package libutf8proc2-2.1.0-lp150.1.3.x86_64
                                                  (7/26),  59.4 KiB (308.7 KiB unpacked)
Retrieving: libutf8proc2-2.1.0-lp150.1.3.x86_64.rpm ..............................[done]
Retrieving package perl-DBI-1.639-lp150.1.3.x86_64
                                                  (8/26), 746.5 KiB (  2.1 MiB unpacked)
Retrieving: perl-DBI-1.639-lp150.1.3.x86_64.rpm ......................[done (1.9 MiB/s)]
Retrieving package perl-Digest-HMAC-1.03-lp150.1.6.noarch
                                                  (9/26),  16.3 KiB ( 10.5 KiB unpacked)
Retrieving: perl-Digest-HMAC-1.03-lp150.1.6.noarch.rpm ...........................[done]
Retrieving package perl-Error-0.17025-lp150.1.6.noarch
                                                 (10/26),  40.5 KiB ( 70.5 KiB unpacked)
Retrieving: perl-Error-0.17025-lp150.1.6.noarch.rpm ..............................[done]
Retrieving package perl-Net-SMTP-SSL-1.04-lp150.1.3.noarch
                                                 (11/26),  12.4 KiB (  4.4 KiB unpacked)
Retrieving: perl-Net-SMTP-SSL-1.04-lp150.1.3.noarch.rpm ..............[done (1.0 KiB/s)]
Retrieving package libapr-util1-1.6.1-lp150.2.6.x86_64
                                                 (12/26), 101.4 KiB (240.5 KiB unpacked)
Retrieving: libapr-util1-1.6.1-lp150.2.6.x86_64.rpm ..............................[done]
Retrieving package perl-DBD-SQLite-1.54-lp150.1.11.x86_64
                                                 (13/26),   1.9 MiB (  8.6 MiB unpacked)
Retrieving: perl-DBD-SQLite-1.54-lp150.1.11.x86_64.rpm ...............[done (1.2 MiB/s)]
Retrieving package perl-Authen-SASL-2.16-lp150.1.3.noarch
                                                 (14/26),  53.2 KiB ( 96.8 KiB unpacked)
Retrieving: perl-Authen-SASL-2.16-lp150.1.3.noarch.rpm ..............[done (15.0 KiB/s)]
Retrieving package libserf-1-1-1.3.9-lp150.2.6.x86_64
                                                 (15/26),  73.4 KiB (145.3 KiB unpacked)
Retrieving: libserf-1-1-1.3.9-lp150.2.6.x86_64.rpm ...............................[done]
Retrieving package subversion-1.10.0-lp150.1.2.x86_64
                                                 (16/26),   2.7 MiB (  9.8 MiB unpacked)
Retrieving: subversion-1.10.0-lp150.1.2.x86_64.rpm ...................[done (2.2 MiB/s)]
Retrieving package subversion-bash-completion-1.10.0-lp150.1.2.noarch
                                                 (17/26), 102.1 KiB ( 47.8 KiB unpacked)
Retrieving: subversion-bash-completion-1.10.0-lp150.1.2.noarch.rpm ...............[done]
Retrieving package subversion-perl-1.10.0-lp150.1.2.x86_64
                                                 (18/26), 989.9 KiB (  4.9 MiB unpacked)
Retrieving: subversion-perl-1.10.0-lp150.1.2.x86_64.rpm ..............[done (1.6 MiB/s)]
Retrieving package libsvn_auth_kwallet-1-0-1.10.0-lp150.1.2.x86_64
                                                 (19/26),  96.6 KiB ( 18.6 KiB unpacked)
Retrieving: libsvn_auth_kwallet-1-0-1.10.0-lp150.1.2.x86_64.rpm ..................[done]
Retrieving package git-core-2.16.4-lp150.2.3.1.x86_64
                                                 (20/26),   3.9 MiB ( 23.1 MiB unpacked)
Retrieving: git-core-2.16.4-lp150.2.3.1.x86_64.rpm ...................[done (2.4 MiB/s)]
Retrieving package gitk-2.16.4-lp150.2.3.1.x86_64
                                                 (21/26), 246.7 KiB (735.0 KiB unpacked)
Retrieving: gitk-2.16.4-lp150.2.3.1.x86_64.rpm .......................[done (1.0 KiB/s)]
Retrieving package git-svn-2.16.4-lp150.2.3.1.x86_64
                                                 (22/26), 644.8 KiB (  1.2 MiB unpacked)
Retrieving: git-svn-2.16.4-lp150.2.3.1.x86_64.rpm ..................[done (414.8 KiB/s)]
Retrieving package git-gui-2.16.4-lp150.2.3.1.x86_64
                                                 (23/26), 311.0 KiB (  1.2 MiB unpacked)
Retrieving: git-gui-2.16.4-lp150.2.3.1.x86_64.rpm ....................[done (2.1 MiB/s)]
Retrieving package git-email-2.16.4-lp150.2.3.1.x86_64
                                                 (24/26), 139.0 KiB ( 59.9 KiB unpacked)
Retrieving: git-email-2.16.4-lp150.2.3.1.x86_64.rpm ..............................[done]
Retrieving package git-cvs-2.16.4-lp150.2.3.1.x86_64
                                                 (25/26), 178.2 KiB (215.5 KiB unpacked)
Retrieving: git-cvs-2.16.4-lp150.2.3.1.x86_64.rpm ................................[done]
Retrieving package git-2.16.4-lp150.2.3.1.x86_64 (26/26), 117.6 KiB (  2.9 KiB unpacked)
Retrieving: git-2.16.4-lp150.2.3.1.x86_64.rpm ........................[done (1.0 KiB/s)]
Checking for file conflicts: .....................................................[done]
( 1/26) Installing: bash-completion-devel-2.7-lp150.2.3.noarch ...................[done]
( 2/26) Installing: cvs-1.12.12-lp150.1.9.x86_64 .................................[done]
( 3/26) Installing: cvsps-2.1-lp150.1.3.x86_64 ...................................[done]
( 4/26) Installing: libapr1-1.6.3-lp150.1.1.x86_64 ...............................[done]
( 5/26) Installing: libpcre2-8-0-10.31-lp150.1.3.x86_64 ..........................[done]
( 6/26) Installing: libsha1detectcoll1-1.0.3-lp150.2.2.x86_64 ....................[done]
( 7/26) Installing: libutf8proc2-2.1.0-lp150.1.3.x86_64 ..........................[done]
( 8/26) Installing: perl-DBI-1.639-lp150.1.3.x86_64 ..............................[done]
( 9/26) Installing: perl-Digest-HMAC-1.03-lp150.1.6.noarch .......................[done]
(10/26) Installing: perl-Error-0.17025-lp150.1.6.noarch ..........................[done]
(11/26) Installing: perl-Net-SMTP-SSL-1.04-lp150.1.3.noarch ......................[done]
(12/26) Installing: libapr-util1-1.6.1-lp150.2.6.x86_64 ..........................[done]
(13/26) Installing: perl-DBD-SQLite-1.54-lp150.1.11.x86_64 .......................[done]
(14/26) Installing: perl-Authen-SASL-2.16-lp150.1.3.noarch .......................[done]
(15/26) Installing: libserf-1-1-1.3.9-lp150.2.6.x86_64 ...........................[done]
(16/26) Installing: subversion-1.10.0-lp150.1.2.x86_64 ...........................[done]
Additional rpm output:
Updating /etc/sysconfig/svnserve ...                                                    


(17/26) Installing: subversion-bash-completion-1.10.0-lp150.1.2.noarch ...........[done]
(18/26) Installing: subversion-perl-1.10.0-lp150.1.2.x86_64 ......................[done]
(19/26) Installing: libsvn_auth_kwallet-1-0-1.10.0-lp150.1.2.x86_64 ..............[done]
(20/26) Installing: git-core-2.16.4-lp150.2.3.1.x86_64 ...........................[done]
(21/26) Installing: gitk-2.16.4-lp150.2.3.1.x86_64 ...............................[done]
(22/26) Installing: git-svn-2.16.4-lp150.2.3.1.x86_64 ............................[done]
(23/26) Installing: git-gui-2.16.4-lp150.2.3.1.x86_64 ............................[done]
(24/26) Installing: git-email-2.16.4-lp150.2.3.1.x86_64 ..........................[done]
(25/26) Installing: git-cvs-2.16.4-lp150.2.3.1.x86_64 ............................[done]
(26/26) Installing: git-2.16.4-lp150.2.3.1.x86_64 ................................[done]

Magic hath been wrought.

brandon@linux-3sb5:~> 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>]

These are common Git commands used in various situations:

start a working area (see also: git help tutorial)
   clone      Clone a repository into a new directory
   init       Create an empty Git repository or reinitialize an existing one

work on the current change (see also: git help everyday)
   add        Add file contents to the index
   mv         Move or rename a file, a directory, or a symlink
   reset      Reset current HEAD to the specified state
   rm         Remove files from the working tree and from the index

examine the history and state (see also: git help revisions)
   bisect     Use binary search to find the commit that introduced a bug
   grep       Print lines matching a pattern
   log        Show commit logs
   show       Show various types of objects
   status     Show the working tree status

grow, mark and tweak your common history
   branch     List, create, or delete branches
   checkout   Switch branches or restore working tree files
   commit     Record changes to the repository
   diff       Show changes between commits, commit and working tree, etc
   merge      Join two or more development histories together
   rebase     Reapply commits on top of another base tip
   tag        Create, list, delete or verify a tag object signed with GPG

collaborate (see also: git help workflows)
   fetch      Download objects and refs from another repository
   pull       Fetch from and integrate with another repository or a local branch
   push       Update remote refs along with associated objects

'git help -a' and 'git help -g' list available subcommands and some
concept guides. See 'git help <command>' or 'git help <concept>'
to read about a specific subcommand or concept.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment