Git和符号链接

Mar*_*ace 1 git

我有2个问题:

  1. 我希望git忽略符号链接
  2. 我很晚才注意到它正在提交符号链接.我可以删除这些已提交的符号链接.他们已被推到遥远的地方.

Ale*_*lec 15

添加所有符号链接 .gitignore

find . -type l >> .gitignore
Run Code Online (Sandbox Code Playgroud)

从存储库中删除所有符号链接

find . -type l -exec git rm --cached {} \;
Run Code Online (Sandbox Code Playgroud)