Last active
April 20, 2024 11:41
-
-
Save pavanpodila/5273693 to your computer and use it in GitHub Desktop.
Revisions
-
pavanpodila revised this gist
Mar 29, 2013 . 1 changed file with 5 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -23,4 +23,8 @@ for branch in $branches; do cp -R ./ $EXPORT_DIR/$name done cd .. rm -rf tmp # back to where we were cd $previous_pwd -
pavanpodila created this gist
Mar 29, 2013 .There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,26 @@ previous_pwd=$PWD cd $(dirname $0) PROJECT="$HOME/Desktop/project" EXPORT_DIR="$HOME/Desktop/export" rm -rf $EXPORT_DIR mkdir -p $EXPORT_DIR rm -rf tmp mkdir tmp cd tmp git clone $PROJECT . branches=($(git branch -a | grep remotes | grep -v HEAD | grep -v master)) for branch in $branches; do local name=${branch/remotes\/origin\//} git checkout origin/$name cp -R ./ $EXPORT_DIR/$name done rm -rf ../tmp