The following sequence is almost identical for creating as well as updating a vendor and could serve as a compact generic checklist too.
# create (if possible orphan) or switch to vendor branch
switch --orphan $VENDOR_BRANCH
switch --create $VENDOR_BRANCH
switch $VENDOR_BRANCH
For the "why" of the orphan branch, see the Git page.
cd $LOCAL_VENDOR_DIR
rm -rfI * # be careful...
git subtree add / pull --prefix=$LOCAL_VENDOR_DIR $URL $VERSION
wget $ZIPFILE_URL
unzip $ZIPFILE
#etc
Rename the directory if it contains version names!
commit $VENDOR_BRANCH
tag $VENDOR_BRANCH $TAG
switch <taskbranch>
Note: this is the step where things could get hairy or even ugly, when the vendor does lot's of refactoring, renaming, etc.
merge $VENDOR_BRANCH
handle conflicts...
edit $LOCAL_VENDOR_DIR/VENDOR.md # (unless VENDOR.sh runs the vendor drop)
VENDOR.md could also be a VENDOR.sh file that executes a vendor drop.
As the next vendor drops are similar, a script is recommended!
See examples for
hack away
switch main
merge task branch
push main branch
push vendor branch
push vendor tag
How to deal with vendors that were initially copy-pasted without using the VB pattern