Git 跳过脚本中的提交路径
我正在寻找一个git代码,它允许我避免在脚本中提交路径。我经常在Mac和PC之间切换以处理本地保存的数据,因为它们使用不同的目录,如果切换系统,我需要更改路径,这很烦人。我试着用Git 跳过脚本中的提交路径,git,github,path,gitignore,Git,Github,Path,Gitignore,我正在寻找一个git代码,它允许我避免在脚本中提交路径。我经常在Mac和PC之间切换以处理本地保存的数据,因为它们使用不同的目录,如果切换系统,我需要更改路径,这很烦人。我试着用 git rm -r --cached <dir> git rm-r——缓存 但这些路径仍在提交中。或者在这种情况下我应该使用gitignore 谢谢 在本例中,我使用.gitignore for mac的模板: # General *.DS_Store .AppleDouble .LSOverride
git rm -r --cached <dir>
git rm-r——缓存
但这些路径仍在提交中。或者在这种情况下我应该使用gitignore
谢谢 在本例中,我使用.gitignore for mac的模板:
# General
*.DS_Store
.AppleDouble
.LSOverride
# Icon must end with two \r
Icon
# Thumbnails
._*
# Files that might appear in the root of a volume
.DocumentRevisions-V100
.fseventsd
.Spotlight-V100
.TemporaryItems
.Trashes
.VolumeIcon.icns
.com.apple.timemachine.donotpresent
# Directories potentially created on remote AFP share
.AppleDB
.AppleDesktop
Network Trash Folder
Temporary Items
.apdisk
您可以在此处找到许多有用的模板:
您是指脚本文件中的路径吗?@VonC是的,没错。