Tag Archives: Submodules

Git: How to remove submodule


Warning: WP_Syntax::substituteToken(): Argument #1 ($match) must be passed by reference, value given in /home/paskov1/addon_domains/vmsoft-bg.com/paskov/root/wp-content/plugins/wp-syntax/wp-syntax.php on line 380

Quick tip on how to remove Git submodule.

  1. Remove the relevant line from the .gitmodules file
  2. Delete the relevant section from .git/config (if any)
  3. Run
    git rm --cached path_to_submodule

    (without trailing slash)

  4. Commit and delete the now untracked submodule files.

Git checkouts fail on Windows with “Filename too long error: unable to create file”


Warning: WP_Syntax::substituteToken(): Argument #1 ($match) must be passed by reference, value given in /home/paskov1/addon_domains/vmsoft-bg.com/paskov/root/wp-content/plugins/wp-syntax/wp-syntax.php on line 380

Cause

According to the msysgit wiki on GitHub and the related fix this error, Filename too long, comes from a Windows API limitation of file paths having 260 characters or fewer.

Resolution

To resolve this issue, run the following command from GitBash or the Git CMD prompt (as administrator):

git config --system core.longpaths true

This will allow file paths of 4096 characters.