我有我的Git bash主目錄在版本控制下。我使用的是白名單(不顧一切除了...):無法在git倉庫中取消配置ssh配置
$ cat .gitignore
# Ignore all the things
*
# But not these (with exceptions)
!*.bash_aliases
!*.bash_profile
!*.bashrc
!*.drush/
!*.drush/*
.drush/cache
!.gitconfig
!.gitignore
!.gitalias
!*.minttyrc
!*.vim/
!*.vim/*
.vim/.netrwhist
!*.vimrc
我想將.ssh/config
添加到例外,但我還沒有似乎已經得到語法正確。
$ ls .ssh/config
.ssh/config
我有這行我.gitignore
:
$ git diff
diff --git a/.gitignore b/.gitignore
index 22b3a79..b84bcd3 100644
--- a/.gitignore
+++ b/.gitignore
@@ -12,6 +12,7 @@
!.gitignore
!.gitalias
!*.minttyrc
+!.ssh/config
!*.vim/
!*.vim/*
.vim/.netrwhist
但是它並沒有被不可忽視:
~ (master)
$ git status
Changes not staged for commit:
modified: .gitignore
no changes added to commit (use "git add" and/or "git commit -a")
中的.gitignore在其他的東西語法來看,我試過這個:
$ git diff
diff --git a/.gitignore b/.gitignore
index 22b3a79..659d7be 100644
--- a/.gitignore
+++ b/.gitignore
@@ -12,6 +12,7 @@
!.gitignore
!.gitalias
!*.minttyrc
+!*.ssh/config
!*.vim/
!*.vim/*
.vim/.netrwhist
無濟於事:
$ git status
Changes not staged for commit:
modified: .gitignore
no changes added to commit (use "git add" and/or "git commit -a")
什麼是增加.ssh/config
在.gitignore
異常的語法?
可能的複製[.gitignore排除文件夾,但包含特定的子文件夾](https://stackoverflow.com/questions/5533 050/gitignore - 排除文件夾 - 丁包括特異性-子目錄) – phd