服务器上文件名太长,Git add命令失败,说“文件名太长”
我初始化了一个git仓库以添加一个Oracle Weblogic服务器的本地实例(是!)以使用git对其进行版本化。Git add命令失败,说“文件名太长”
oracle文件位于c:\ Oracle中。所以,我需要添加同样与git
我发出以下命令
的git的init(在C:\它具有Oracle目录)
添加的.gitignore目录在C:\和忽视所有在c:\的目录除了Oracle
然后运行'git status'来查看状态。正如预期的那样,它表现出以下
C:\>git status
# On branch master
#
# Initial commit
#
# Untracked files:
# (use "git add ..." to include in what will be committed)
#
# .gitignore
# Oracle/
nothing added to commit but untracked files present (use "git add" to track)
现在,我做了git的添加* 预期上面的命令扔显示正在添加的文件中有一些详细的输出和结束与命令输出以下(尾下面显示)
....
base_domain/servers/AdminServer/tmp/.appmergegen_1387484701373_liferay-portal-6.
1.30-ee-ga3-20130812170130063.war/html/VAADIN/themes/runo/tree/tree.css.
The file will have its original line endings in your working directory.
warning: LF will be replaced by CRLF in Oracle/Middleware/user_projects/domains/
base_domain/servers/AdminServer/tmp/.appmergegen_1387484701373_liferay-portal-6.
1.30-ee-ga3-20130812170130063.war/html/VAADIN/themes/runo/window/window.css.
The file will have its original line endings in your working directory.
fatal: unable to stat 'Oracle/Middleware/user_projects/domains/base_domain/serve
rs/AdminServer/tmp/.appmergegen_1387484701373_liferay-portal-6.1.30-ee-ga3-20130
812170130063.war/html/VAADIN/widgetsets/com.vaadin.portal.gwt.PortalDefaultWidge
tSet/043D1FB3F694D0D6D3ACFB33DB80E43D.cache.html': Filename too long
然后我发了git的状态,以查看该文件被添加
C:\>git status
# On branch master
#
# Initial commit
#
# Untracked files:
# (use "git add ..." to include in what will be committed)
#
# .gitignore
# Oracle/
nothing added to commit but untracked files present (use "git add" to track)
像什么事都没有如此看来en补充说。 git文件夹太大了吗?
我试过Bazaar和它的GUI控制冻结,每当我使用存储库。现在我正在尝试Mercurial以查看它是否可以处理它。
+0
是否有一个原因,你在''C:\''中创建存储库,并忽略了一堆而不是直接在C:\ Oracle \''中创建存储库? –
+0
确实。另外,我怀疑你真的想用Git来跟踪tmp目录。 –
+0
@Chris在c:\中只是为了方便。如果我在c:\中启动存储库,而不是在c:\ Oracle \ .git中初始化该存储库,它必须使压缩整个c:\ Oracle目录并根据需要发布它,而不包括.git文件夹更容易。 –