Add a README and the worktrees script.

This commit is contained in:
Darren 'Tadgy' Austin 2025-09-10 16:30:02 +01:00
commit ac4224804b
2 changed files with 26 additions and 0 deletions

17
README.md Normal file
View file

@ -0,0 +1,17 @@
README
======
System configurations are stored in a seperate branch for each host or purpose.
List available branches:
* git branch -avv
Check out specific branch:
* git checkout <branch name>
WORKTREES
=========
Instead of checking out individual branches into the worktree, it is possible to checkout multiple branches into sub-directories to work on concurrently.
The set up script 'worktrees' in the "master" branch will create the necessary structure and add the worktrees.
This script should only be run once per clone's "master" worktree.

9
worktrees Executable file
View file

@ -0,0 +1,9 @@
#!/bin/bash
# Set up the structure to use worktrees in this clone.
BRANCHES=("core")
for BRANCH in "${BRANCHES[@]"; do
mkdir -p "$BRANCH"
git worktree add "./$BRANCH" "origin/$BRANCH"
done