【发布时间】:2012-08-11 14:51:09
【问题描述】:
当我运行gitk 时,会弹出一个 Tk 窗口,提示“它在此处找不到 GIT 存储库”。
我错过了什么?这些是我遵循的步骤。如果我错过了一些愚蠢的事情,请原谅我。
[~/TEMP]$ ls
[~/TEMP]$ git init abc
Initialized empty Git repository in /*******/home/jganhotra/TEMP/abc/.git/
添加了一个文件
[~/TEMP]$ cd abc/
[~/TEMP]$ ls -la
total 16
drwxr-x--- 3 jganhotra eng 4096 Aug 15 16:05 ./
drwxr-x--- 3 jganhotra eng 4096 Aug 15 16:04 ../
drwxr-x--- 8 jganhotra eng 4096 Aug 15 16:05 .git/
[abc]$ touch a.txt
[abc]$ gvim a.txt
[abc]$ git status
# On branch master
#
# Initial commit
#
# Untracked files:
# (use "git add <file>..." to include in what will be committed)
#
# a.txt
nothing added to commit but untracked files present (use "git add" to track)
[abc]$ git add .
[abc]$ git commit -m "Added file"
[master (root-commit) 1ff1051] Added file
1 file changed, 1 insertion(+)
create mode 100644 a.txt
提交
[abc]$ git status
# On branch master
nothing to commit (working directory clean)
[abc]$ git log
commit 1ff1051370dfb69a0e85a60f322da7389366db8b
Author: Jatin Kumar Ganhotra <jganhotra@******.com>
Date: Mon Aug 13 19:10:38 2012 +0530
Added file
[abc]$ gitk
[abc]$ which gitk
gitk: aliased to /*******/tools/install/git-tools/git-1.7.11.2/bin/gitk
[abc]$ ls -la /******/tools/install/git-tools/git-1.7.11.2/bin/gitk
-rwxr-x--- 1 devadmin eng 329597 Jul 17 17:43 /*******/tools/install/git-tools/git-1.7.11.2/bin/gitk
这应该有效。我错过了什么?我相信还有一些依赖。
【问题讨论】:
-
请将
ls -la在abc/目录下的输出添加到帖子中。 -
我添加了
ls -la输出。是的,我知道 .git 目录及其作用。它就在那里。 -
我猜我没有安装 gitk 需要的一些内部依赖项。
-
也许它以非特权用户身份运行?对 gitk 文件执行 ls -la。
-
从路径结构我猜你使用 Linux 作为你的操作系统。您安装了哪些 Git 软件包,例如通过
apt-get,或者你是从源代码编译的?