&引用;git添加-全部;命令不在my GitRepository/.vim/subdir/subsubdir下添加文件
我只想在每台计算机上同步我的.vim文件夹。这就是我为此所做的:1。cp-r~/.vim~/GitRepository/2。cd~/git3。GitAdd——全部4个。提交并推送。但是当我检查我的github时,那些文件应该在/.vim/subdir/sub-subdir下,因为它们丢失了。这些子分区变为空。虽然我没有一个.gitignore文件,但是是什么让这一切发生的呢?这对我没有任何帮助 当我输入git status时。这些注释显示:&引用;git添加-全部;命令不在my GitRepository/.vim/subdir/subsubdir下添加文件,git,vim,Git,Vim,我只想在每台计算机上同步我的.vim文件夹。这就是我为此所做的:1。cp-r~/.vim~/GitRepository/2。cd~/git3。GitAdd——全部4个。提交并推送。但是当我检查我的github时,那些文件应该在/.vim/subdir/sub-subdir下,因为它们丢失了。这些子分区变为空。虽然我没有一个.gitignore文件,但是是什么让这一切发生的呢?这对我没有任何帮助 当我输入git status时。这些注释显示: ─➤ git status On branch m
─➤ git status
On branch master
Your branch is up-to-date with 'origin/master'.
Changes not staged for commit:
(use "git add <file>..." to update what will be committed)
(use "git checkout -- <file>..." to discard changes in working directory)
(commit or discard the untracked or modified content in submodules)
modified: .vim/bundle/vim-snippets (modified content)
no changes added to commit (use "git add" and/or "git commit -a")
─➤ git状态
论分行行长
您的分支机构是最新的“原始/主”分支机构。
未为提交而暂存的更改:
(使用“git add…”更新将提交的内容)
(使用“git签出--…”放弃工作目录中的更改)
(提交或放弃子模块中未跟踪或修改的内容)
修改:.vim/bundle/vim片段(修改内容)
未向提交添加任何更改(使用“git add”和/或“git commit-a”)
是什么让这一切发生的
===================第二次编辑=============
谢谢大家。“git add-all”实际上错过了我的点文件。但是,这并不能解决我的问题
下面是我键入git add.vim之后的内容/
╰─➤ git status
On branch master
Your branch is up-to-date with 'origin/master'.
Changes to be committed:
(use "git reset HEAD <file>..." to unstage)
new file: .vim/.netrwhist
new file: .vim/.vimrc
new file: .vim/.ycm_extra_conf.py
new file: .vim/.ycm_extra_conf.pyc
new file: .vim/bundle/Vundle.vim
new file: .vim/bundle/YouCompleteMe
new file: .vim/bundle/ctrlp.vim
new file: .vim/bundle/molokai
new file: .vim/bundle/nerdtree
new file: .vim/bundle/tagbar
new file: .vim/bundle/ultisnips
new file: .vim/bundle/vim-airline
new file: .vim/bundle/vim-colorschemes
new file: .vim/bundle/vim-fugitive
new file: .vim/bundle/vim-json
new file: .vim/bundle/vim-snippets
new file: .vim/colors/molokai.vim
new file: .vim/colors/solarized.vim
Changes not staged for commit:
(use "git add <file>..." to update what will be committed)
(use "git checkout -- <file>..." to discard changes in working directory)
(commit or discard the untracked or modified content in submodules)
modified: .vim/bundle/vim-snippets (modified content)
╰─➤ git状态
论分行行长
您的分支机构是最新的“原始/主”分支机构。
要提交的更改:
(使用“git重置磁头…”取消分级)
新文件:.vim/.netrwhist
新文件:.vim/.vimrc
新文件:.vim/.ycm\u extra\u conf.py
新文件:.vim/.ycm\u extra\u conf.pyc
新文件:.vim/bundle/Vundle.vim
新文件:.vim/bundle/YouCompleteMe
新文件:.vim/bundle/ctrlp.vim
新文件:.vim/bundle/molokai
新文件:.vim/bundle/nerdtree
新文件:.vim/bundle/tagbar
新文件:.vim/bundle/ultisnips
新文件:.vim/bundle/vim airline
新文件:.vim/bundle/vim colorschemes
新文件:.vim/bundle/vim逃犯
新文件:.vim/bundle/vim json
新文件:.vim/bundle/vim代码段
新文件:.vim/colors/molokai.vim
新文件:.vim/colors/solarized.vim
未为提交而暂存的更改:
(使用“git add…”更新将提交的内容)
(使用“git签出--…”放弃工作目录中的更改)
(提交或放弃子模块中未跟踪或修改的内容)
修改:.vim/bundle/vim片段(修改内容)
git无法识别这些目录,这是为什么?add--all
不会添加隐藏的文件或目录(即以点开头的文件或目录)。您需要按名称显式地添加它们(或者至少是像*
这样的模式)
(离题,但可能有帮助:我使用它来管理我的点文件。它自动化了你现在手工做的许多事情。)add——所有的
都不会添加隐藏的文件或目录(即以点开头的文件或目录)。您需要按名称显式地添加它们(或者至少是像*
这样的模式)
(离题,但可能有帮助:我用于我的点文件管理。它自动化了您现在手动执行的许多操作。)如果要递归添加目录及其内部的所有文件,必须在
add
命令中指定目录名
$ git add directoryname
如果要以递归方式添加目录及其内部的所有文件,必须在
add
命令中指定目录名
$ git add directoryname
您可以使用的最佳方法是:
git add *
或
git添加
您可以使用的最佳方法是:
git add *
或
git添加
最后,我找到了原因。我使用vundle管理我的vim和.vim/文件夹。因此,vundle在每个“subdir”中使用git服务,并且在每个“subdir”中使用.gitignore,它实际上在“subdir”中忽略了这些内容。最后,我找到了原因。我使用vundle管理我的vim和.vim/文件夹。因此,vundle在每个“subdir”中使用git服务,并且在每个“subdir”中使用.gitignore,它实际上会在“subdir”中忽略这些内容。不,这是不正确的。可以使用add--all
添加目录,而无需显式命名;隐藏目录不能。不,这是不正确的。可以使用add--all
添加目录,而无需显式命名;隐藏目录不能。谢谢你关于想家的建议。但这需要更多的时间来了解。你能更详细地描述一下“明确地用名字”吗?我应该按名称手动键入git add吗?git add~/GitRepository/.vim
,如果我正确理解了您的目录结构。是的,我完全按照您说的做。但问题仍然没有解决。我再次编辑了问答,除了~/GitRepository下的一些点文件外,它没有显示任何尊重。谢谢你关于思乡病的建议。但这需要更多的时间来了解。你能更详细地描述一下“明确地用名字”吗?我应该按名称手动键入git add吗?git add~/GitRepository/.vim
,如果我正确理解了您的目录结构。是的,我完全按照您说的做。但问题仍然没有解决。我再次编辑了问答,除了~/GitRepository下的一些点文件外,它没有显示任何差异。如果您没有.gitignore并且不关心任何虚拟文件,您可以尝试git添加-如果您没有.gitignore并且不关心任何虚拟文件,则可以尝试添加-f
可能重复的