Skip to content

Instantly share code, notes, and snippets.

@vishwasbabu
Last active December 15, 2015 07:49
Show Gist options
  • Save vishwasbabu/5226560 to your computer and use it in GitHub Desktop.
Save vishwasbabu/5226560 to your computer and use it in GitHub Desktop.
Batch files for Handling git fork workflow (for MifosX)
@echo on
w:
cd W:\mifos\tomcat\webapps
DEL /F /S /Q /A mifosng-provider.war
RD /S /Q mifosng-provider
copy W:\mifos\mifosx\mifosng-provider\build\libs\mifosng-provider.war mifosng-provider.war
@echo off
set /p branchName="Task you want to start working on: " %=%
w:
REM create new branch with latest code for Reference UI
cd W:\mifos\mifosx-community-apps
git checkout master
git fetch upstream
git merge upstream/master
git checkout -b %branchName%
REM create new branch with latest code for Platform, also test for compilation
cd w:\mifos\mifosx
git checkout master
git fetch upstream
git merge upstream/master
git checkout -b %branchName%
REM also do a clean build
cd mifosng-provider
gradle clean war
@echo on
set /p branchName="Task you have completed: " %=%
set /p comments="Description of the task: " %=%
w:
cd w:\mifos\mifosx
git checkout %branchName%
git add --all
git commit -a -m "%comments%"
git checkout master
git fetch upstream
git merge upstream/master
git checkout %branchName%
git rebase master
git push origin %branchName%
cd W:\mifos\mifosx-community-apps
git checkout %branchName%
git add --all
git commit -a -m "%comments%"
git checkout master
git fetch upstream
git merge upstream/master
git checkout %branchName%
git rebase master
git push origin %branchName%
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment