Skip to main content
Fix for the case that we have a file "foo" and then also a file "foo.css"
Source Link
Alex
  • 14k
  • 19
  • 83
  • 167

The best I came up with was running this after an composer install/update

$ find * -type l -not -exec grep -q ""^{}"$" .gitignore \; -print >> .gitignore

The command should be run in the git root directory. It adds all symlinks to the .gitignore file that aren't in there already.

The best I came up with was running this after an composer install/update

$ find * -type l -not -exec grep -q "{}" .gitignore \; -print >> .gitignore

The command should be run in the git root directory. It adds all symlinks to the .gitignore file that aren't in there already.

The best I came up with was running this after an composer install/update

$ find * -type l -not -exec grep -q "^{}$" .gitignore \; -print >> .gitignore

The command should be run in the git root directory. It adds all symlinks to the .gitignore file that aren't in there already.

Remove the leading ./ from the symlinks that find finds.
Source Link
Vinai
  • 14.1k
  • 2
  • 43
  • 83

The best I came up with was running this after an composer install/update

$ find .* -type l -not -exec grep -q "{}" .gitignore \; -print >> .gitignore

The command should be run in the git root directory. It adds all symlinks to the .gitignore file that aren't in there already.

The best I came up with was running this after an composer install/update

$ find . -type l -not -exec grep -q "{}" .gitignore \; -print >> .gitignore

The command should be run in the git root directory. It adds all symlinks to the .gitignore file that aren't in there already.

The best I came up with was running this after an composer install/update

$ find * -type l -not -exec grep -q "{}" .gitignore \; -print >> .gitignore

The command should be run in the git root directory. It adds all symlinks to the .gitignore file that aren't in there already.

Revert previous change since it introduces breakage
Source Link
Vinai
  • 14.1k
  • 2
  • 43
  • 83

The best I came up with was running this after an composer install/update

$ find . -type l -not -exec grep -q "{}" .gitignore \; -print | sed 's/^\.\///' >> .gitignore

The command should be run in the git root directory. It adds all symlinks to the .gitignore file that aren't in there already.

The best I came up with was running this after an composer install/update

$ find . -type l -not -exec grep -q "{}" .gitignore \; -print | sed 's/^\.\///' >> .gitignore

The command should be run in the git root directory. It adds all symlinks to the .gitignore file that aren't in there already.

The best I came up with was running this after an composer install/update

$ find . -type l -not -exec grep -q "{}" .gitignore \; -print >> .gitignore

The command should be run in the git root directory. It adds all symlinks to the .gitignore file that aren't in there already.

Remove leading ./ of the resulting records
Source Link
Vinai
  • 14.1k
  • 2
  • 43
  • 83
Loading
Source Link
Vinai
  • 14.1k
  • 2
  • 43
  • 83
Loading