Created
January 23, 2014 18:16
-
-
Save dulichan/8583865 to your computer and use it in GitHub Desktop.
Git repo management scripts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Merge development branch to master branch | |
function merge_projects(){ | |
# Path to child project | |
cd /Users/dulitharasangawijewantha/Development/WSO2/apps/mdm | |
git checkout master | |
git pull origin master | |
git merge $1 | |
git push origin master | |
} | |
# Get updates from master for child projects in parent project | |
function merge_submodule(){ | |
# Child project location in parent project | |
cd /Users/dulitharasangawijewantha/Development/WSO2/wso2mobile-server/products/mdm/modules/jaggery-apps/mdm | |
git pull origin $1 | |
} | |
# Push all child projects to development branch | |
function pull_all_projects(){ | |
# Path to child project | |
cd /Users/dulitharasangawijewantha/Development/WSO2/apps/mdm | |
git pull origin $1 | |
} | |
# Push code from current branch to remote branch | |
function push_all_projects(){ | |
# Path to child project | |
cd /Users/dulitharasangawijewantha/Development/WSO2/apps/mdm | |
git push origin $1 | |
} | |
# Get the new development branch from github | |
function get_new_dev_branch(){ | |
# Path to child project | |
cd /Users/dulitharasangawijewantha/Development/WSO2/apps/mdm | |
git fetch origin | |
git checkout remotes/origin/$1 | |
git checkout -b $1 | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment