somewhere

This commit is contained in:
Михаил Капелько
2025-11-08 22:18:12 +03:00
parent ab8755955c
commit c04a258b0e

View File

@@ -3,6 +3,7 @@ SDIR=$(cd "$(dirname "$0")" ; pwd -P)
DST_DIR=/Users/mk/test-dist
REPO_URL=https://github.com/kornerr/ru
TMP_BRANCHES=/tmp/dbg-branches
# Clone since the directory does not exist
if [ ! -d "$DST_DIR" ]; then
@@ -13,10 +14,9 @@ fi
cd $DST_DIR
git pull
# Find out the latest branch
git branch -r --sort=-committerdate | head -n2
branch=`git branch -r --sort=-committerdate | head -n2`
echo $branch
# Find out the latest commit in the whole repo
cmt=`git branch -av --sort=-committerdate | head -n1 | cut -d' ' -f4`
echo "Latest commit: $cmt"
# Switch to the latest branch
#git checkout $branch
git checkout $cmt