我有我的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