mirror of
https://github.com/nikdoof/dotfiles.git
synced 2025-12-13 09:42:27 +00:00
[shell-common] Fix PKM command to work with branch names
This commit is contained in:
@@ -52,8 +52,9 @@ function commit-pkm() {
|
|||||||
echo "No changes detected"
|
echo "No changes detected"
|
||||||
fi
|
fi
|
||||||
git fetch
|
git fetch
|
||||||
if [ $(git rev-parse main) != $(git rev-parse refs/remotes/origin/main) ]; then
|
branch=$(git rev-parse --abbrev-ref HEAD)
|
||||||
git push origin
|
if [ $(git rev-parse ${branch}) != $(git rev-parse refs/remotes/origin/${branch}) ]; then
|
||||||
|
git push origin ${branch}
|
||||||
fi
|
fi
|
||||||
cd $PREVDIR
|
cd $PREVDIR
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user