-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathreset.bat
More file actions
53 lines (37 loc) · 729 Bytes
/
reset.bat
File metadata and controls
53 lines (37 loc) · 729 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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
@echo OFF
@rem --------------------------------------------------------------
@rem
@rem --------------------------------------------------------------
setlocal
@rem store the drive and path of this file in a variable
set dirname=%~dp0
@rem cd to the directory containing this file
pushd %dirname%
@rem do stuff
:folder
if "%1%" == "" goto askfolder
set fldr=%1%
goto run
:askfolder
set /p fldr="Folder (C:\%HOMEPATH%\Documents\Folder): "
set fldr=%HOMEPATH%\Documents\%fldr%
::goto end
:run
echo %fldr%
c:
cd %fldr%
git fetch --all
git reset --hard origin/master
git pull origin master
pause
goto end
:help
echo.
echo Usage:
echo reset.bat Folder
echo.
pause
:end
@rem cd back to where we started
popd
endlocal