github.com/kcmerrill/alfred@v0.0.0-20180727171036-06445dcb5e3d/remote-modules/git.yml (about) 1 clone: 2 summary: Clone project 3 usage: alfred common/git checkout projectname projectfolder 4 command: | 5 git clone git@github.com:{{ index .Args 0 }}.git 6 cd $(ls -td -- */ | head -n 1) 7 alfred /git:submodule-update-init 8 9 checkout: 10 summary: Checkout commit 11 command: > 12 git reset HEAD --hard && 13 git fetch --all && 14 git checkout {{ index .Args 0 }} && 15 git pull 16 17 submodule-update-init: 18 summary: Update/Init submodules 19 command: | 20 git submodule update --init --recursive 21 22 submodule: 23 summary: Checkout submodule 24 dir: "{{ index .Args 0 }}" 25 command: > 26 git reset HEAD --hard && 27 git checkout {{ index .Args 1}} 28 29 revision: 30 summary: The number of revisions this repository has 31 command: git shortlog | grep -E '^[ ]+\w+' | wc -l | tr -d '[[:space:]]' 32