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