git gui and gitk not present after installing git

…衆ロ難τιáo~ 提交于 2019-12-03 04:14:22

问题


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.


回答1:


sudo apt-get install git-gui gitk



回答2:


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



回答3:


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.




回答4:


you can do install all git functions using command:

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



回答5:


To install git-gui type this command:

sudo apt-get install git-gui

Then to open git-gui type:

git citool




回答6:


For a centos system you can use the following command:

sudo yum install git-gui gitk



来源:https://stackoverflow.com/questions/14673257/git-gui-and-gitk-not-present-after-installing-git

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!