Skip to content

Instantly share code, notes, and snippets.

@cbrammer
Created November 15, 2012 18:36
Show Gist options
  • Save cbrammer/4080347 to your computer and use it in GitHub Desktop.
Save cbrammer/4080347 to your computer and use it in GitHub Desktop.
Merging all
Add these files in a bin somewhere that is accessible via your PATH.
In any repo you can run `crossmerge B1 B2` for example: `crossmerge dev test`
To do this in all repos, to the parent directory of all the repos and run `mergeall dev test`
#!/bin/sh
git checkout $1
git pull origin $1
git checkout $2
git pull origin $2
git merge $1
git push origin $2
git checkout $1
#!/bin/sh
set -e
set -x
export B1=$1
export B2=$2
cd Achievements;crossmerge $B1 $B2;cd ..;
cd admin;crossmerge $B1 $B2;cd ..;
cd api;crossmerge $B1 $B2;cd ..;
cd sketch;crossmerge $B1 $B2;cd ..;
cd tempest;crossmerge $B1 $B2;cd ..;
cd website-main;crossmerge $B1 $B2;cd ..;
cd workout-manager;crossmerge $B1 $B2;cd ..;
cd log-workout;crossmerge $B1 $B2;cd ..;
cd program-manager;crossmerge $B1 $B2;cd ..;
cd workout-translator;crossmerge $B1 $B2;cd ..;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment