Fix pull.sh: tambah auto-fix untuk dubious ownership issue
This commit is contained in:
8
pull.sh
8
pull.sh
@@ -11,6 +11,13 @@ if [ ! -d ".git" ]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Fix dubious ownership jika perlu
|
||||
REPO_PATH=$(pwd)
|
||||
if ! git config --global --get-regexp "safe.directory" | grep -q "$REPO_PATH"; then
|
||||
echo "🔒 Adding safe.directory untuk fix ownership issue..."
|
||||
git config --global --add safe.directory "$REPO_PATH"
|
||||
fi
|
||||
|
||||
# Cek branch saat ini
|
||||
CURRENT_BRANCH=$(git branch --show-current)
|
||||
echo "📍 Current branch: $CURRENT_BRANCH"
|
||||
@@ -33,4 +40,3 @@ echo "✅ Pull selesai!"
|
||||
echo ""
|
||||
echo "📊 Status:"
|
||||
git status --short
|
||||
|
||||
|
||||
Reference in New Issue
Block a user