-
Notifications
You must be signed in to change notification settings - Fork 39
Expand file tree
/
Copy pathlimpar_git_config.bat
More file actions
37 lines (33 loc) · 929 Bytes
/
limpar_git_config.bat
File metadata and controls
37 lines (33 loc) · 929 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
@echo off
cls
echo Iniciando processo de limpeza das configuracoes do Git...
echo.
REM Removendo email global do Git
git config --global --unset-all user.email
IF %ERRORLEVEL% EQU 0 (
echo [OK] Email global removido com sucesso.
) ELSE (
echo [?] Falha ao remover o email global ou nao foi encontrado.
)
timeout /t 2 >nul
REM Removendo nome global do Git
git config --global --unset-all user.name
IF %ERRORLEVEL% EQU 0 (
echo [OK] Nome global removido com sucesso.
) ELSE (
echo [?] Falha ao remover o nome global ou nao foi encontrado.
)
timeout /t 2 >nul
REM Removendo credencial armazenada do GitHub
cmdkey /delete:LegacyGeneric:target=git:https://github.com
IF %ERRORLEVEL% EQU 0 (
echo.
echo [OK] Credencial do GitHub removida com sucesso.
) ELSE (
echo.
echo [?] Falha ao remover a credencial do GitHub ou ela nao existia.
)
timeout /t 2 >nul
echo.
echo Processo finalizado.
pause