git gui and gitk not present after installing git

2019-03-08 18:27发布

I am using Ubuntu 11.10 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

peter@peter-Inspiron-620:/var/www$ sudo git gui

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


Did you mean one of these?
grep
init
pull
push

peter@peter-Inspiron-620:/var/www$ 

For gitk

peter@peter-Inspiron-620:/var/www$ sudo gitk
sudo: gitk: command not found
peter@peter-Inspiron-620:/var/www$ 

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

Thanks, Peter.

6条回答
2楼-- · 2019-03-08 18:55

When u get 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.

查看更多
一夜七次
3楼-- · 2019-03-08 19:04

For a centos system you can use the following command:

sudo yum install git-gui gitk

查看更多
贼婆χ
4楼-- · 2019-03-08 19:06
sudo apt-get install git-gui gitk

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

git gui

or

gitk
查看更多
smile是对你的礼貌
5楼-- · 2019-03-08 19:09
sudo apt-get install git-gui gitk
查看更多
Summer. ? 凉城
6楼-- · 2019-03-08 19:13

To install git-gui type this command:

sudo apt-get install git-gui

Then to open git-gui type:

git citool

查看更多
在下西门庆
7楼-- · 2019-03-08 19:16

you can do install all git functions using command:

sudo apt-get install git-core git-gui git-doc
查看更多
登录 后发表回答