stg-whatchanged command not found

In this troubleshooting guide we learn how to fix stg-whatchanged command not found error message

Introduction

When you run more command in linux terminal / console, you get the following error message

stg-whatchanged: command not found

or when using sudo you get the following error message

sudo: stg-whatchanged: command not found

Solutions to stg-whatchanged: command not found

How To Fix stg-whatchanged: command not found in Ubuntu / Debian / Kali Linux / Raspbian

In Ubuntu stg-whatchanged is provided by stgit-contrib package.

stgit-contrib is:

Among others, this package provides the following helper scripts:

  • stg-gitk: show all patches in gitk, not only applied ones, and hide logs
  • stg-whatchanged: examine changes that would modify the current patch
  • stg-fold-files-from: pick specific hunks from another patch up the stack
  • stg-dispatch: dispatch specific hunks into another patch down the stack
  • stg-swallow: completely merge another patch into the current one
  • stg-k: provide robust –keep functionality to all stgit commands

Most of the functionality of these scripts may one day be incorporated into stgit.

To fix this problem, we can install more using the command below.

sudo apt-get -y install stgit-contrib

This command might take some time to finish depending on your machine internet connection.

You can also use apt command to install stgit-contrib.

sudo apt -y install stgit-contrib

Or if you have aptitude installed you can use the following command.

sudo aptitude install stgit-contrib

Summary

In this tutorial we learn how to fix stg-whatchanged command not found error in Ubuntu / Debian / Kali Linux or Raspbian distribution.