Skip to content

Instantly share code, notes, and snippets.

@stephenparish
Created July 15, 2014 15:03
Show Gist options
  • Star 9 You must be signed in to star a gist
  • Fork 6 You must be signed in to fork a gist
  • Save stephenparish/603e637308567f453a16 to your computer and use it in GitHub Desktop.
Save stephenparish/603e637308567f453a16 to your computer and use it in GitHub Desktop.
Update submodules in a git repository to the latest, but exclude one..
git submodule foreach '[ "$path" == "submodule-to-exclude" ] || git pull origin master'
Copy link

ghost commented Aug 24, 2017

I had to change == to = in order to make it work (ubuntu 16.04)

@kaurov
Copy link

kaurov commented Dec 31, 2018

git submodule foreach '[ "$path" = "library/PhpExcel" ] || git status'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment