跳转至内容

Pacman 开发

来自 ArchWiki

对 Pacman 开发感兴趣?本页面将帮助你入门。

请记住,如果你认为某个内容应该出现在此页面上,请添加它!当前的 pacman 开发者不太可能知道人们需要了解什么,以及什么应该在此页面上。

开发者仓库

一些“常客”拥有自己的仓库,里面包含进行中的工作、工作和功能分支等。这里列出了一些,但请随意添加你可能知道的其他仓库。

Git 技巧

在使用这些技巧之前,强烈建议阅读 Git 文章。

克隆 git 仓库 - 只需一次

$ git clone https://gitlab.archlinux.org/pacman/pacman.git

启用有用的钩子

$ mv .git/hooks/applypatch-msg.sample .git/hooks/applypatch-msg
$ mv .git/hooks/commit-msg.sample .git/hooks/commit-msg
$ mv .git/hooks/pre-commit.sample .git/hooks/pre-commit
$ mv .git/hooks/pre-rebase.sample .git/hooks/pre-rebase

或者

$ rename .sample "" .git/hooks/*.sample

始终在新本地分支上进行工作,以避免麻烦。

创建到 master 分支的补丁

$ git format-patch master

修改补丁 (推送后不要使用)

$ git commit -a --amend -s

更新 master 分支

$ git checkout master
$ git pull

将 master 的更改与“分支”合并

$ git rebase master branch

获取 maint 分支

$ git checkout -b maint origin/maint

添加一个远程仓库

$ git remote add toofishes git://code.toofishes.net/dan/pacman.git

获取 toofishes 的工作分支

$ git branch -r
$ git checkout -b toofishes-working toofishes/working