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 分支上的更改与 “branch” 合并

$ 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