2.1 Use as secondary package manager

To use Borg as a secondary package manager alongside Package, begin by installing the former using the latter. Borg is available from Melpa, so you have to add that archive first.

(add-to-list 'package-archives
             (cons "melpa" "https://melpa.org/packages/")
             t)

Then you have to M-x package-refresh-contents RET before you can M-x package-install RET borg RET. Doing that should add a verbose variant of this to your init file:

(custom-set-variables
 '(package-selected-packages '(borg)))

Then you have to make the two package managers aware of each other by replacing the call to package-initialize in your init file with this:

(if (require 'borg-elpa nil t)
    (borg-elpa-initialize)
  (package-initialize))

When using both Package and Borg, then Borg defaults to installing packages in borg/. (When using just Borg, then it instead uses lib/.) Set the Git variable borg.drones-directory to use another directory.

You should also add a Makefile containing:

BORG_SECONDARY_P = true
include $(shell find -L elpa -maxdepth 1 -regex '.*/borg-[.0-9]*' |\
  sort | tail -n 1)/borg.mk

You should also add the following lines at the top of .gitmodules. This isn’t strictly necessary, but if you don’t, then you must use .gitmodules whenever this manual says, that you should set some variable in .borgconfig or .gitremotes.

[include]
        path = .gitremotes
        path = .borgconfig

Despite its title, some parts of the next section are also relevant when Borg is installed using Package, so don’t skip it.