Looking for somewhere to put the git command to allow a git describe to respond with the expected output, and I realised that only the current branch is pulled on update.
Why not just a git pull as that 'fetches' (everything) and 'merges' the current branch.
Either way, can git fetch --all --prune be inserted before this conditional as it simply updates git with the commit history rather than changing anything.
https://github.com/openenergymonitor/emonpi/blob/1a87023a3000b611c2d99a87505e88d84e8d79eb/update/emoncms.sh#L64
Looking for somewhere to put the git command to allow a git describe to respond with the expected output, and I realised that only the current branch is pulled on update.
Why not just a
git pull
as that 'fetches' (everything) and 'merges' the current branch.Either way, can
git fetch --all --prune
be inserted before this conditional as it simply updates git with the commit history rather than changing anything.