git的辅助工具,模仿mercurial的serve命令
项目描述
这是一个git的辅助工具,模仿mercurial的serve命令。
通过运行轻量级的本地服务器,它使得通过git自己的git的gitweb查看所有git项目变得非常简单。
使用方法
当gitserve正确安装(使用sudo)时,它通常位于/usr/local/bin。请注意,此目录需要包含在您的$PATH环境变量中,以便您的shell能够找到它。
使用方法很简单
$ gitserve --help Usage: gitserve [options] <dir> Options: --version show program's version number and exit -h, --help show this help message and exit -v, --verbose print status messages to stdout -q, --quiet don't print anything to stdout -p PORT, --port=PORT port to listen on (default: 8000) -a ADDRESS, --address=ADDRESS address to listen on (default: hostname) -l, --local only listen on 127.0.0.1 -b, --browser open default browser automatically -d, --daemon detach from terminal and become a daemon --pid-file=PIDFILE write the spawned process-id to this file --gitweb=GITWEB use this gitweb cgi file instead of the included version
作为唯一参数,您可以指定包含您的git项目的目录。如果您留空此参数,gitserve将自动使用当前目录作为gitweb脚本的源。例如。
$ gitserve /home/jannis/git-projects
目录参数中的快捷方式也是可能的,将在运行时展开
$ gitserve ~/git-projects
默认的gitserve进程将在您的计算机主机名和端口8000上监听,例如:http://127.0.0.1:8000/
如果您在启动gitserve时提供--port或--address选项,您可以指定gitserve监听的位置。要在端口80或任何小于1024的端口上运行它,您需要是root用户。--local选项告诉gitserve只在127.0.0.1上监听。
--browser选项告诉gitserve在启动时自动使用系统默认的网页浏览器打开gitserve服务器的URL。
--daemon选项使整个gitserve进程从当前shell会话断开,成为后台运行的守护进程。与--pid-file选项结合使用时非常有用,该选项将进程ID写入指定的文件。
您可以使用--gitweb选项指定gitserve使用的gitweb.cgi文件的路径(例如,/home/jannis/lib/git/gitweb.cgi)。
项目详情
关闭
gitserve-0.2.0.tar.gz的哈希值
算法 | 哈希摘要 | |
---|---|---|
SHA256 | 827dc9c4cdd1a5cd6788304c000475321e7e7107c64df0d96759539ab92095ce |
|
MD5 | 2ac758f65b5205bf57f25ffefae71c11 |
|
BLAKE2b-256 | a37acbb87890a9492a3f12272a5c510a777658f00cd453cedfff309649ab2640 |