.gitconfig 494 B

1234
  1. [alias]
  2. add-app = "!f() { if [ \"$1\" = \"\" -o \"$2\" = \"\" -o \"$3\" = \"\" ]; then echo \"Usage: git add-app <path> <repo> <branch>\" && exit; fi; set -e; git subtree add -P \"$1\" \"$2\" \"$3\"; echo \"$2 $3\" > \"$1/.gitremote\"; git add \"$1/.gitremote\"; git commit -m \"Add upstream remote\"; }; f"
  3. update-app = "!f() { git subtree pull -P $GIT_PREFIX $(<${GIT_PREFIX}.gitremote); }; f"
  4. bulk-update-apps = "!f() { find . -name .gitremote -execdir git update-app \\;; }; f"