43

I am using Ubuntu 11.10 (Oneiric Ocelot) and have just installed Git using

sudo apt-get install

The basic Git commands seem to work. (I have created a repository and added a directory structure to it.) But not Git GUI or gitk. This is what I get:

sudo git gui

Output:

git: 'gui' is not a git command. See 'git --help'.


Did you mean one of these?
grep
init
pull
push

For gitk:

sudo gitk

Output:

sudo: gitk: command not found

Do those commands run on Ubuntu and do I need to install them separately?

4
  • 2
    why sudo? gitk needs to be separately installed. Not sure what git-gui is? Feb 3, 2013 at 14:03
  • 4
    In Ubuntu (and Debian), Git has split gitk and git-gui out of the main git (previously git-core) package a while ago. They'll need to be installed additionally (or install git-all which will have them installed as well) Feb 3, 2013 at 14:23
  • I use sudo because the directory is owned by www-data. Feb 3, 2013 at 18:55
  • I used git-all. Probably blew away a lot more disk space that I needed to solve this problem but will make sure I have all the tools for the future and I have over 400 GB. Thanks, Peter. Feb 3, 2013 at 18:57

6 Answers 6

83
sudo apt-get install git-gui gitk
1
  • Thanks. I used git-all which also worked but the way you mention is probably a lot more efficient in terms of disk space usage. Thanks, Peter. Feb 3, 2013 at 18:58
8
sudo apt-get install git-gui gitk

After installing it, it's very probable that no menu item appears in your desktop or .. To open them, open Terminal (usually, Ctrl + T) and type

git gui

or

gitk
2

When you get an error during installing Git GUI as below,

sudo apt-get install git-gui 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Package git-gui is not available, but is referred to by another package.

This may mean that the package is missing, has been obsoleted, or is only available from another source:

E: Package 'git-gui' has no installation candidate

Try this command as

  1. sudo apt-get install update
  2. sudo apt-get install git-gui

Then it worked.

1

For a CentOS system you can use the following command:

sudo yum install git-gui gitk

0

You can install all Git functions using this command:

sudo apt-get install git-core git-gui git-doc
0

To install git-gui, type this command:

sudo apt-get install git-gui

Then to open git-gui, type:

git citool

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.