mirror of
https://gitlab.com/JKANetwork/jka-toolkit.git
synced 2026-02-24 14:03:50 +01:00
Add clean branch
This commit is contained in:
@@ -8,7 +8,7 @@ preOption=$(git status 2>/dev/stdout | sed -n 1p | cut -f2 -d" ")
|
|||||||
if [ $preOption = "Not" ];then #When it isn't only it can do git clone
|
if [ $preOption = "Not" ];then #When it isn't only it can do git clone
|
||||||
gitopt=`dialog --stdout --scrollbar --menu "gitdit - Git DIalog inTerface $VERSION" 0 0 6 c "Descargar un nuevo repo (Hacer clone)" i "Inicializar nuevo repo"`
|
gitopt=`dialog --stdout --scrollbar --menu "gitdit - Git DIalog inTerface $VERSION" 0 0 6 c "Descargar un nuevo repo (Hacer clone)" i "Inicializar nuevo repo"`
|
||||||
else #Else, all other options
|
else #Else, all other options
|
||||||
gitopt=`dialog --stdout --scrollbar --menu "gitdit - Git DIalog inTerface" 0 0 6 p "Descargar actualizaciones del git (Hacer pull)" t "Confirmar cambios sin subida" s "Subir actualizaciones al git (Hacer push)" n "Crear nueva rama" b "Cambiar de rama " m "Unir ramas (Hacer merge)"`
|
gitopt=`dialog --stdout --scrollbar --menu "gitdit - Git DIalog inTerface" 0 0 6 p "Descargar actualizaciones del git (Hacer pull)" t "Confirmar cambios sin subida" s "Subir actualizaciones al git (Hacer push)" d "Volver al último commit" n "Crear nueva rama" b "Cambiar de rama " m "Unir ramas (Hacer merge)"`
|
||||||
actual="origin $(git branch --list | grep "^*" | cut -f2 -d" ")" #Current branch
|
actual="origin $(git branch --list | grep "^*" | cut -f2 -d" ")" #Current branch
|
||||||
actual2=$(git branch --list | grep "^*" | cut -f2 -d" ") #Current branch name
|
actual2=$(git branch --list | grep "^*" | cut -f2 -d" ") #Current branch name
|
||||||
fi
|
fi
|
||||||
@@ -134,5 +134,16 @@ if [ ! -z $merges ];then
|
|||||||
git push $actual
|
git push $actual
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
|
"d")
|
||||||
|
var=1
|
||||||
|
while [[ $var -eq 1 ]]; do
|
||||||
|
if [[ $(ls -a | grep .git) ]]; then
|
||||||
|
var=0
|
||||||
|
else
|
||||||
|
cd ..
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
git checkout .;
|
||||||
|
;;
|
||||||
esac
|
esac
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user