Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What causes git interactive to not be present when git is installed?

Tags:

git

linux

alpine

Running on Alpine Linux 3.10, I've installed the distribution's git package using apk.

In an existing checkout directory, when I try to launch git add's interactive mode:

$ git add -i

I get the error:

git: 'add--interactive' is not a git command. See 'git --help'.

The git add help indicates that -i is a valid option.

What is happening?

like image 203
rakslice Avatar asked Aug 23 '19 20:08

rakslice


Video Answer


1 Answers

The interactive mode feature of git uses perl, and in many Linux distributions the perl-based parts of git are separated out into another package, so that the core functionality of git can be used without needing to install perl.

On Alpine, the git package just has this core functionality.

To get the missing functionality on Alpine, install the git-perl package.

$ sudo apk add git-perl
like image 61
rakslice Avatar answered Nov 14 '22 20:11

rakslice