您应该从提交中排除 folders/files 的 Firefox 配置文件?
What folders/files of a Firefox profile should you exclude from your commit?
我正在尝试将 Firefox 配置文件存储在 git 中。我已将其配置为使用代理,并且我希望能够在再次检查代码时恢复配置文件。
据我所知 the documentation 有一个 Cache
文件夹和一个 Offline Cache
文件夹可能不应该包括在内,因为它们只是缓存文件夹,而不是任何文件夹保留加载 Firefox 配置文件时要使用的代理设置很重要。
配置文件文件夹中是否还有其他不值得包含在提交中的内容,因为它与以下内容无关:
- 正在阻止加载配置文件。
- 防止在下次结账时加载代理设置
我试过添加以下内容:
# Ignore FF Cache
ProxyProfileFF/cache2/**
ProxyProfileFF/OfflineCache/**
ProxyProfileFF/jumpListCache/**
ProxyProfileFF/startupCache/**
ProxyProfileFF/saved-telemetry-pings/**
# Ignore vim temp files
*~
这是我的 .gitignore 文件:
(存储在配置文件文件夹中) 即
/Users/me/Library/Application Support/Firefox/Profiles/9j5n99pf.default
here is a link to the gist as well
cookies.sqlite
cookies.sqlite-wal
favicons.sqlite-wal
logins.json
places.sqlite-wal
prefs.js
storage/
datareporting/
webappsstore.sqlite
webappsstore.sqlite-wal
weave/
addonStartup.json.lz4
favicons.sqlite
permissions.sqlite
places.sqlite
protections.sqlite
search.json.mozlz4
serviceworker.txt
sessionCheckpoints.json
SiteSecurityServiceState.txt
storage-sync.sqlite
storage.sqlite
bookmarkbackups
saved-telemetry-pings
sessionstore.jsonlz4
addons.json
AlternateServices.txt
content-prefs.sqlite
extensions.json
formhistory.sqlite
xulstore.json
我更喜欢“先安全后后悔”的方法。
也就是排除一切,只添加真正需要的文件,基于https://support.mozilla.org/en-US/kb/profiles-where-firefox-stores-user-data。此外,我不会添加我知道/认为它们存储登录凭据/密码的文件(这些文件标有 NEVER STORE THEM UNENCRYPTED
)。
这是我的 .gitignore
,
# ## exclude everything and only allow specific files
*
!.gitignore
# ###################################
# ## FIREFOX
# ## based on https://support.mozilla.org/en-US/kb/profiles-where-firefox-stores-user-data
!profiles.ini
!installs.ini
#
# ## profiles
!Profiles/
!Profiles/*/
#
# ## bookmarks, downloads & browsing history
!Profiles/*/places.sqlite
#!Profiles/*/favicons.sqlite
!Profiles/*/bookmarkbackups/
!Profiles/*/bookmarkbackups/*
#
# ## site-specific preferences
!Profiles/*/permissions.sqlite
!Profiles/*/content-prefs.sqlite
#
# ## search engins
#!Profiles/*/search.json.mozlz4
#
# ## personal dictionary
!Profiles/*/persdict.dat
#
# ## autocompelte history
#!Profiles/*/formhistory.sqlite
#
# ## cookies & passwords
# ## NEVER STORE THEM UNENCRYPTED
#!Profiles/*/key4.db
#!Profiles/*/logins.json
#!Profiles/*/cookies.sqlite
#
# ## DOM storage
# ## NEVER STORE THEM UNENCRYPTED?
#!Profiles/*/webappsstore.sqlite
#!Profiles/*/chromeappsstore.sqlite
#
# ## Extensions
!Profiles/*/extension*
!Profiles/*/extensions/*
#
# ## security certificate settings
#!Profiles/*/cert9.db
#
# ## security device settings
#!Profiles/*/pkcs11.txt
#
# ## download actions
#!Profiles/*/handlers.json
#
# ## stored sessions
#!Profiles/*/sessionstore.jsonlz4
#
# ## toolbar customization
#!Profiles/*/xulstore.json
#
# ## user preferences
!Profiles/*/prefs.js
!Profiles/*/user.js
#
# ## containers
!Profiles/*/containers.json