Created
May 19, 2016 12:57
-
-
Save watsy0007/d2263a887fbacc1a599a4747329bc1b0 to your computer and use it in GitHub Desktop.
git subtree封装
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
function fetchcore() { | |
return $(echo $(git fetch core)) | |
} | |
function pulcore() { | |
if [[ -z fetchcore ]] then | |
local branch | |
if [[ $1 ]] then | |
branch=$1 | |
else | |
branch=release | |
fi | |
echo $branch | |
git subtree pull --prefix=subapp/core core $branch --squash | |
else | |
echo 'no changes' | |
fi | |
} | |
function pshcore() { | |
if [[ -z fetchcore ]] then | |
local branch | |
if [[ $1 ]] then | |
branch=$1 | |
else | |
branch=release | |
fi | |
echo $branch | |
git subtree push --prefix=subapp/core core $branch --squash | |
else | |
echo 'no changes' | |
fi | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment