-
Notifications
You must be signed in to change notification settings - Fork 1
/
clean.bat
30 lines (26 loc) · 813 Bytes
/
clean.bat
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
@echo off
rem setlocal
rem git checkout --orphan latest_branch
rem git add -A
rem git commit -am "Re-index Repository"
rem git branch -D master
rem git branch -m master
rem git push -f origin master
rem git push -u --force origin master
rem remove the old files
rem git gc --aggressive --prune=all
rem ----------------------------------
set /p commitmsg="Enter Commit Messages: "
rem -- Remove the history from
rm -rf .git
rem -- recreate the repos from the current content only
git init
git add .
git commit -m "%commitmsg%"
rem -- push to the github remote repos ensuring you overwrite history
git remote add origin https://github.com/dimaslanjaka/universal-framework.git
cls
echo "Pushing to remote -> origin master"
git push -u --force origin master
rem --------------------------------------
rem endlocal