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"
|
||||
fi
|
||||
git fetch
|
||||
if [ $(git rev-parse main) != $(git rev-parse refs/remotes/origin/main) ]; then
|
||||
git push origin
|
||||
branch=$(git rev-parse --abbrev-ref HEAD)
|
||||
if [ $(git rev-parse ${branch}) != $(git rev-parse refs/remotes/origin/${branch}) ]; then
|
||||
git push origin ${branch}
|
||||
fi
|
||||
cd $PREVDIR
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user