37 lines
1.1 KiB
Batchfile
37 lines
1.1 KiB
Batchfile
@echo off
|
|
G:
|
|
mkdir "%~1.git"
|
|
cd "%~1.git"
|
|
git init --bare
|
|
git config core.logAllRefUpdates "true"
|
|
cd ..
|
|
robocopy /E "%~1.git" "\\mestsa003.infineon.com\Git\%~1.git"
|
|
cd "%~1"
|
|
git init
|
|
git rev-parse --git-dir
|
|
git fetch
|
|
git remote --verbose
|
|
git remote add origin "\\mestsa003.infineon.com\Git\%~1.git"
|
|
copy "G:\VS-Code-Settings\Visual Studio Settings\.editorconfig" "G:\%~1\.editorconfig"
|
|
dotnet new gitignore --force
|
|
dotnet new tool-manifest --force
|
|
dotnet tool install Husky
|
|
dotnet tool restore
|
|
dotnet husky install
|
|
REM dotnet husky add pre-commit
|
|
copy "G:\VS-Code-Settings\Git\pre-commit" "G:\%~1\.husky\pre-commit"
|
|
copy "G:\VS-Code-Settings\Git\task-runner.json" "G:\%~1\.husky\task-runner.json"
|
|
copy "G:\VS-Code-Settings\Git\package.json" "G:\%~1\package.json"
|
|
git add .
|
|
git commit -m "Initial Commit"
|
|
echo "If commit fails run"
|
|
echo "git commit -m 'Initial Commit'"
|
|
echo "Once commit passes press return to continue"
|
|
@pause
|
|
git push -u origin master
|
|
echo "Copy bare to 192.168.0.73:/srv/git/%~1 then press return to add remote"
|
|
@pause
|
|
git remote add Ubuntu git@192.168.0.73:/srv/git/%~1.git
|
|
git push Ubuntu master
|
|
code .
|
|
exit |