如何修改git空文件夹的错误
方法一解决此类问题
第1步:做一个.git的备份(实际上,我在每一个改变某些内容的步骤之间都会这样做,但是使用新的副本名称,例如.git-old-1,.git-old-2等) :
cp -a .git .git-old
第2步:运行 git fsck --full
nathanvan@nathanvan-N61Jq:~/workspace/mcmc-chapter$ git fsck --full
error: object file .git/objects/8b/61d0135d3195966b443f6c73fb68466264c68e is empty
fatal: loose object 8b61d0135d3195966b443f6c73fb68466264c68e (stored in .git/objects/8b/61d0135d3195966b443f6c73fb68466264c68e) is corrupt
第3步:删除空文件。我想到了什么; 无论如何它的空白。
nathanvan@nathanvan-N61Jq:~/workspace/mcmc-chapter$ rm .git/objects/8b/61d0135d3195966b443f6c73fb68466264c68e
rm: remove write-protected regular empty file `.git/objects/8b/61d0135d3195966b443f6c73fb68466264c68e'? y
第3步:git fsck
再次运行。继续删除空文件。您也可以cd
进入.git
目录并运行find . -type f -empty -delete -print
以删除所有空文件。最终git开始告诉我这实际上是在对目录做些什么:
nathanvan@nathanvan-N61Jq:~/workspace/mcmc-chapter$ git fsck --full
Checking object directories: 100% (256/256), done.
error: object file .git/objects/e0/cbccee33aea970f4887194047141f79a363636 is empty
fatal: loose object e0cbccee33aea970f4887194047141f79a363636 (stored in .git/objects/e0/cbccee33aea970f4887194047141f79a363636) is corrupt
第4步:删除所有空文件后,我最终git fsck
实际运行:
nathanvan@nathanvan-N61Jq:~/workspace/mcmc-chapter$ git fsck --full
Checking object directories: 100% (256/256), done.
error: HEAD: invalid sha1 pointer af9fc0c5939eee40f6be2ed66381d74ec2be895f
error: refs/heads/master does not point to a valid object!
error: refs/heads/master.u1conflict does not point to a valid object!
error: 0e31469d372551bb2f51a186fa32795e39f94d5c: invalid sha1 pointer in cache-tree
dangling blob 03511c9868b5dbac4ef1343956776ac508c7c2a2
missing blob 8b61d0135d3195966b443f6c73fb68466264c68e
missing blob e89896b1282fbae6cf046bf21b62dd275aaa32f4
dangling blob dd09f7f1f033632b7ef90876d6802f5b5fede79a
missing blob caab8e3d18f2b8c8947f79af7885cdeeeae192fd
missing blob e4cf65ddf80338d50ecd4abcf1caf1de3127c229
第5步:尝试git reflog
。因为我的HEAD坏了而失败。
nathanvan@nathanvan-N61Jq:~/workspace/mcmc-chapter$ git reflog
fatal: bad object HEAD
第6步:Google。找到这个。手动获取reflog的最后两行:
nathanvan@nathanvan-N61Jq:~/workspace/mcmc-chapter$ tail -n 2 .git/logs/refs/heads/master
f2d4c4868ec7719317a8fce9dc18c4f2e00ede04 9f0abf890b113a287e10d56b66dbab66adc1662d Nathan VanHoudnos <nathanvan@gmail.com> 1347306977 -0400 commit: up to p. 24, including correcting spelling of my name
9f0abf890b113a287e10d56b66dbab66adc1662d af9fc0c5939eee40f6be2ed66381d74ec2be895f Nathan VanHoudnos <nathanvan@gmail.com> 1347358589 -0400 commit: fixed up to page 28
步骤7:请注意,从步骤6我们了解到HEAD当前正指向最后一次提交。所以我们试着看看父提交:
nathanvan@nathanvan-N61Jq:~/workspace/mcmc-chapter$ git show 9f0abf890b113a287e10d56b66dbab66adc1662d
commit 9f0abf890b113a287e10d56b66dbab66adc1662d
Author: Nathan VanHoudnos <nathanvan@XXXXXX>
Date: Mon Sep 10 15:56:17 2012 -0400up to p. 24, including correcting spelling of my namediff --git a/tex/MCMC-in-IRT.tex b/tex/MCMC-in-IRT.tex
index 86e67a1..b860686 100644
--- a/tex/MCMC-in-IRT.tex
+++ b/tex/MCMC-in-IRT.tex
有效!
第8步:现在我们需要将HEAD指向9f0abf890b113a287e10d56b66dbab66adc1662d。
nathanvan@nathanvan-N61Jq:~/workspace/mcmc-chapter$ git update-ref HEAD 9f0abf890b113a287e10d56b66dbab66adc1662d
哪些没有抱怨。
第9步:看看fsck说什么:
nathanvan@nathanvan-N61Jq:~/workspace/mcmc-chapter$ git fsck --full
Checking object directories: 100% (256/256), done.
error: refs/heads/master.u1conflict does not point to a valid object!
error: 0e31469d372551bb2f51a186fa32795e39f94d5c: invalid sha1 pointer in cache-tree
dangling blob 03511c9868b5dbac4ef1343956776ac508c7c2a2
missing blob 8b61d0135d3195966b443f6c73fb68466264c68e
missing blob e89896b1282fbae6cf046bf21b62dd275aaa32f4
dangling blob dd09f7f1f033632b7ef90876d6802f5b5fede79a
missing blob caab8e3d18f2b8c8947f79af7885cdeeeae192fd
missing blob e4cf65ddf80338d50ecd4abcf1caf1de3127c229
第10步:缓存树中的无效sha1指针看起来像是来自(现在已过期的)索引文件(源)。所以我杀了它,并重置回购。
nathanvan@nathanvan-N61Jq:~/workspace/mcmc-chapter$ rm .git/index
nathanvan@nathanvan-N61Jq:~/workspace/mcmc-chapter$ git reset
Unstaged changes after reset:
M tex/MCMC-in-IRT.tex
M tex/recipe-example/build-example-plots.R
M tex/recipe-example/build-failure-plots.R
第11步:再次查看fsck ...
nathanvan@nathanvan-N61Jq:~/workspace/mcmc-chapter$ git fsck --full
Checking object directories: 100% (256/256), done.
error: refs/heads/master.u1conflict does not point to a valid object!
dangling blob 03511c9868b5dbac4ef1343956776ac508c7c2a2
dangling blob dd09f7f1f033632b7ef90876d6802f5b5fede79a
在晃来晃去斑点不是错误。我不关心master.u1冲突,现在它正在工作,我不想再碰它了!
第12步:赶上我的本地编辑:
nathanvan@nathanvan-N61Jq:~/workspace/mcmc-chapter$ git status
# On branch 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)
#
# modified: tex/MCMC-in-IRT.tex
# modified: tex/recipe-example/build-example-plots.R
# modified: tex/recipe-example/build-failure-plots.R
#
< ... snip ... >
no changes added to commit (use "git add" and/or "git commit -a")nathanvan@nathanvan-N61Jq:~/workspace/mcmc-chapter$ git commit -a -m "recovering from the git fiasco"
[master 7922876] recovering from the git fiasco3 files changed, 12 insertions(+), 94 deletions(-)nathanvan@nathanvan-N61Jq:~/workspace/mcmc-chapter$ git add tex/sept2012_code/example-code-testing.R
nathanvan@nathanvan-N61Jq:~/workspace/mcmc-chapter$ git commit -a -m "adding in the example code"
[master 385c023] adding in the example code1 file changed, 331 insertions(+)create mode 100644 tex/sept2012_code/example-code-testing.R
所以希望这对未来的人们有一些用处。我很高兴它的工作
方法二,基本上和方法一方法类似
- error: object file .git/objects/31/65329bb680e30595f242b7c4d8406ca63eeab0 is empty
- fatal: loose object 3165329bb680e30595f242b7c4d8406ca63eeab0 (stored in .git/objects/31/65329bb680e30595f242b7c4d8406ca63eeab0) is corrupt
如何解决呢?STACKOVERFLOW上一个大神给出如下解决方案
方法一:
Step 1: Make a backup of .git (in fact I do this in between every step that changes something, but with a new copy-to name, e.g. .git-old-1, .git-old-2, etc.):
cp -a .git .git-old
Step 2: Run git fsck --full
nathanvan@nathanvan-N61Jq:~/workspace/mcmc-chapter$ git fsck --full
error: object file .git/objects/8b/61d0135d3195966b443f6c73fb68466264c68e is empty
fatal: loose object 8b61d0135d3195966b443f6c73fb68466264c68e (stored in .git/objects/8b/61d0135d3195966b443f6c73fb68466264c68e) is corrupt
Step 3: Remove the empty file. I figured what the heck; its blank anyway.
nathanvan@nathanvan-N61Jq:~/workspace/mcmc-chapter$ rm .git/objects/8b/61d0135d3195966b443f6c73fb68466264c68e
rm: remove write-protected regular empty file `.git/objects/8b/61d0135d3195966b443f6c73fb68466264c68e'? y
Step 3: Run git fsck
again. Continue deleting the empty files. You can also cd
into the .git
directory and run find . -type f -empty -delete -print
to remove all empty files. Eventually git started telling me it was actually doing something with the object directories:
nathanvan@nathanvan-N61Jq:~/workspace/mcmc-chapter$ git fsck --full
Checking object directories: 100% (256/256), done.
error: object file .git/objects/e0/cbccee33aea970f4887194047141f79a363636 is empty
fatal: loose object e0cbccee33aea970f4887194047141f79a363636 (stored in .git/objects/e0/cbccee33aea970f4887194047141f79a363636) is corrupt
Step 4: After deleting all of the empty files, I eventually came to git fsck
actually running:
nathanvan@nathanvan-N61Jq:~/workspace/mcmc-chapter$ git fsck --full
Checking object directories: 100% (256/256), done.
error: HEAD: invalid sha1 pointer af9fc0c5939eee40f6be2ed66381d74ec2be895f
error: refs/heads/master does not point to a valid object!
error: refs/heads/master.u1conflict does not point to a valid object!
error: 0e31469d372551bb2f51a186fa32795e39f94d5c: invalid sha1 pointer in cache-tree
dangling blob 03511c9868b5dbac4ef1343956776ac508c7c2a2
missing blob 8b61d0135d3195966b443f6c73fb68466264c68e
missing blob e89896b1282fbae6cf046bf21b62dd275aaa32f4
dangling blob dd09f7f1f033632b7ef90876d6802f5b5fede79a
missing blob caab8e3d18f2b8c8947f79af7885cdeeeae192fd
missing blob e4cf65ddf80338d50ecd4abcf1caf1de3127c229
Step 5: Try git reflog
. Fail because my HEAD is broken.
nathanvan@nathanvan-N61Jq:~/workspace/mcmc-chapter$ git reflog
fatal: bad object HEAD
Step 6: Google. Find this. Manually get the last two lines of the reflog:
nathanvan@nathanvan-N61Jq:~/workspace/mcmc-chapter$ tail -n 2 .git/logs/refs/heads/master
f2d4c4868ec7719317a8fce9dc18c4f2e00ede04 9f0abf890b113a287e10d56b66dbab66adc1662d Nathan VanHoudnos <nathanvan@gmail.com> 1347306977 -0400 commit: up to p. 24, including correcting spelling of my name
9f0abf890b113a287e10d56b66dbab66adc1662d af9fc0c5939eee40f6be2ed66381d74ec2be895f Nathan VanHoudnos <nathanvan@gmail.com> 1347358589 -0400 commit: fixed up to page 28
Step 7: Note that from Step 6 we learned that the HEAD is currently pointing to the very last commit. So let's try to just look at the parent commit:
nathanvan@nathanvan-N61Jq:~/workspace/mcmc-chapter$ git show 9f0abf890b113a287e10d56b66dbab66adc1662d
commit 9f0abf890b113a287e10d56b66dbab66adc1662d
Author: Nathan VanHoudnos <nathanvan@XXXXXX>
Date: Mon Sep 10 15:56:17 2012 -0400up to p. 24, including correcting spelling of my namediff --git a/tex/MCMC-in-IRT.tex b/tex/MCMC-in-IRT.tex
index 86e67a1..b860686 100644
--- a/tex/MCMC-in-IRT.tex
+++ b/tex/MCMC-in-IRT.tex
It worked!
Step 8: So now we need to point HEAD to 9f0abf890b113a287e10d56b66dbab66adc1662d.
nathanvan@nathanvan-N61Jq:~/workspace/mcmc-chapter$ git update-ref HEAD 9f0abf890b113a287e10d56b66dbab66adc1662d
Which didn't complain.
Step 9: See what fsck says:
nathanvan@nathanvan-N61Jq:~/workspace/mcmc-chapter$ git fsck --full
Checking object directories: 100% (256/256), done.
error: refs/heads/master.u1conflict does not point to a valid object!
error: 0e31469d372551bb2f51a186fa32795e39f94d5c: invalid sha1 pointer in cache-tree
dangling blob 03511c9868b5dbac4ef1343956776ac508c7c2a2
missing blob 8b61d0135d3195966b443f6c73fb68466264c68e
missing blob e89896b1282fbae6cf046bf21b62dd275aaa32f4
dangling blob dd09f7f1f033632b7ef90876d6802f5b5fede79a
missing blob caab8e3d18f2b8c8947f79af7885cdeeeae192fd
missing blob e4cf65ddf80338d50ecd4abcf1caf1de3127c229
Step 10: The invalid sha1 pointer in cache-tree seemed like it was from a (now outdated) index file (source). So I killed it and reset the repo.
nathanvan@nathanvan-N61Jq:~/workspace/mcmc-chapter$ rm .git/index
nathanvan@nathanvan-N61Jq:~/workspace/mcmc-chapter$ git reset
Unstaged changes after reset:
M tex/MCMC-in-IRT.tex
M tex/recipe-example/build-example-plots.R
M tex/recipe-example/build-failure-plots.R
Step 11: Looking at the fsck again...
nathanvan@nathanvan-N61Jq:~/workspace/mcmc-chapter$ git fsck --full
Checking object directories: 100% (256/256), done.
error: refs/heads/master.u1conflict does not point to a valid object!
dangling blob 03511c9868b5dbac4ef1343956776ac508c7c2a2
dangling blob dd09f7f1f033632b7ef90876d6802f5b5fede79a
The dangling blobs are not errors. I'm not concerned with master.u1conflict, and now that it is working I don't want to touch it anymore!
Step 12: Catching up with my local edits:
nathanvan@nathanvan-N61Jq:~/workspace/mcmc-chapter$ git status
# On branch 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)
#
# modified: tex/MCMC-in-IRT.tex
# modified: tex/recipe-example/build-example-plots.R
# modified: tex/recipe-example/build-failure-plots.R
#
< ... snip ... >
no changes added to commit (use "git add" and/or "git commit -a")nathanvan@nathanvan-N61Jq:~/workspace/mcmc-chapter$ git commit -a -m "recovering from the git fiasco"
[master 7922876] recovering from the git fiasco3 files changed, 12 insertions(+), 94 deletions(-)nathanvan@nathanvan-N61Jq:~/workspace/mcmc-chapter$ git add tex/sept2012_code/example-code-testing.R
nathanvan@nathanvan-N61Jq:~/workspace/mcmc-chapter$ git commit -a -m "adding in the example code"
[master 385c023] adding in the example code1 file changed, 331 insertions(+)create mode 100644 tex/sept2012_code/example-code-testing.R
So hopefully that can be of some use to people in the future. I'm glad it worked.
我有类似的问题。我的笔记本电脑在git操作过程中电池耗尽。嘘。
我没有任何备份。(NB Ubuntu One不是git的备份解决方案,它将有助于覆盖已损坏的仓库。)
对于git巫师来说,如果这是修复它的一个不好的方法,请留下评论。但是,它确实为我工作......至少是暂时的。
第1步:做一个.git的备份(实际上,我在每一个改变某些内容的步骤之间都会这样做,但是使用新的副本名称,例如.git-old-1,.git-old-2等) :
cp -a .git .git-old
第2步:运行 git fsck --full
nathanvan@nathanvan-N61Jq:~/workspace/mcmc-chapter$ git fsck --full
error: object file .git/objects/8b/61d0135d3195966b443f6c73fb68466264c68e is empty
fatal: loose object 8b61d0135d3195966b443f6c73fb68466264c68e (stored in .git/objects/8b/61d0135d3195966b443f6c73fb68466264c68e) is corrupt
第3步:删除空文件。我想到了什么; 无论如何它的空白。
nathanvan@nathanvan-N61Jq:~/workspace/mcmc-chapter$ rm .git/objects/8b/61d0135d3195966b443f6c73fb68466264c68e
rm: remove write-protected regular empty file `.git/objects/8b/61d0135d3195966b443f6c73fb68466264c68e'? y
第3步:git fsck
再次运行。继续删除空文件。您也可以cd
进入.git
目录并运行find . -type f -empty -delete -print
以删除所有空文件。最终git开始告诉我这实际上是在对目录做些什么:
nathanvan@nathanvan-N61Jq:~/workspace/mcmc-chapter$ git fsck --full
Checking object directories: 100% (256/256), done.
error: object file .git/objects/e0/cbccee33aea970f4887194047141f79a363636 is empty
fatal: loose object e0cbccee33aea970f4887194047141f79a363636 (stored in .git/objects/e0/cbccee33aea970f4887194047141f79a363636) is corrupt
第4步:删除所有空文件后,我最终git fsck
实际运行:
nathanvan@nathanvan-N61Jq:~/workspace/mcmc-chapter$ git fsck --full
Checking object directories: 100% (256/256), done.
error: HEAD: invalid sha1 pointer af9fc0c5939eee40f6be2ed66381d74ec2be895f
error: refs/heads/master does not point to a valid object!
error: refs/heads/master.u1conflict does not point to a valid object!
error: 0e31469d372551bb2f51a186fa32795e39f94d5c: invalid sha1 pointer in cache-tree
dangling blob 03511c9868b5dbac4ef1343956776ac508c7c2a2
missing blob 8b61d0135d3195966b443f6c73fb68466264c68e
missing blob e89896b1282fbae6cf046bf21b62dd275aaa32f4
dangling blob dd09f7f1f033632b7ef90876d6802f5b5fede79a
missing blob caab8e3d18f2b8c8947f79af7885cdeeeae192fd
missing blob e4cf65ddf80338d50ecd4abcf1caf1de3127c229
第5步:尝试git reflog
。因为我的HEAD坏了而失败。
nathanvan@nathanvan-N61Jq:~/workspace/mcmc-chapter$ git reflog
fatal: bad object HEAD
第6步:Google。找到这个。手动获取reflog的最后两行:
nathanvan@nathanvan-N61Jq:~/workspace/mcmc-chapter$ tail -n 2 .git/logs/refs/heads/master
f2d4c4868ec7719317a8fce9dc18c4f2e00ede04 9f0abf890b113a287e10d56b66dbab66adc1662d Nathan VanHoudnos <nathanvan@gmail.com> 1347306977 -0400 commit: up to p. 24, including correcting spelling of my name
9f0abf890b113a287e10d56b66dbab66adc1662d af9fc0c5939eee40f6be2ed66381d74ec2be895f Nathan VanHoudnos <nathanvan@gmail.com> 1347358589 -0400 commit: fixed up to page 28
步骤7:请注意,从步骤6我们了解到HEAD当前正指向最后一次提交。所以我们试着看看父提交:
nathanvan@nathanvan-N61Jq:~/workspace/mcmc-chapter$ git show 9f0abf890b113a287e10d56b66dbab66adc1662d
commit 9f0abf890b113a287e10d56b66dbab66adc1662d
Author: Nathan VanHoudnos <nathanvan@XXXXXX>
Date: Mon Sep 10 15:56:17 2012 -0400up to p. 24, including correcting spelling of my namediff --git a/tex/MCMC-in-IRT.tex b/tex/MCMC-in-IRT.tex
index 86e67a1..b860686 100644
--- a/tex/MCMC-in-IRT.tex
+++ b/tex/MCMC-in-IRT.tex
有效!
第8步:现在我们需要将HEAD指向9f0abf890b113a287e10d56b66dbab66adc1662d。
nathanvan@nathanvan-N61Jq:~/workspace/mcmc-chapter$ git update-ref HEAD 9f0abf890b113a287e10d56b66dbab66adc1662d
哪些没有抱怨。
第9步:看看fsck说什么:
nathanvan@nathanvan-N61Jq:~/workspace/mcmc-chapter$ git fsck --full
Checking object directories: 100% (256/256), done.
error: refs/heads/master.u1conflict does not point to a valid object!
error: 0e31469d372551bb2f51a186fa32795e39f94d5c: invalid sha1 pointer in cache-tree
dangling blob 03511c9868b5dbac4ef1343956776ac508c7c2a2
missing blob 8b61d0135d3195966b443f6c73fb68466264c68e
missing blob e89896b1282fbae6cf046bf21b62dd275aaa32f4
dangling blob dd09f7f1f033632b7ef90876d6802f5b5fede79a
missing blob caab8e3d18f2b8c8947f79af7885cdeeeae192fd
missing blob e4cf65ddf80338d50ecd4abcf1caf1de3127c229
第10步:缓存树中的无效sha1指针看起来像是来自(现在已过期的)索引文件(源)。所以我杀了它,并重置回购。
nathanvan@nathanvan-N61Jq:~/workspace/mcmc-chapter$ rm .git/index
nathanvan@nathanvan-N61Jq:~/workspace/mcmc-chapter$ git reset
Unstaged changes after reset:
M tex/MCMC-in-IRT.tex
M tex/recipe-example/build-example-plots.R
M tex/recipe-example/build-failure-plots.R
第11步:再次查看fsck ...
nathanvan@nathanvan-N61Jq:~/workspace/mcmc-chapter$ git fsck --full
Checking object directories: 100% (256/256), done.
error: refs/heads/master.u1conflict does not point to a valid object!
dangling blob 03511c9868b5dbac4ef1343956776ac508c7c2a2
dangling blob dd09f7f1f033632b7ef90876d6802f5b5fede79a
在晃来晃去斑点不是错误。我不关心master.u1冲突,现在它正在工作,我不想再碰它了!
第12步:赶上我的本地编辑:
nathanvan@nathanvan-N61Jq:~/workspace/mcmc-chapter$ git status
# On branch 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)
#
# modified: tex/MCMC-in-IRT.tex
# modified: tex/recipe-example/build-example-plots.R
# modified: tex/recipe-example/build-failure-plots.R
#
< ... snip ... >
no changes added to commit (use "git add" and/or "git commit -a")nathanvan@nathanvan-N61Jq:~/workspace/mcmc-chapter$ git commit -a -m "recovering from the git fiasco"
[master 7922876] recovering from the git fiasco3 files changed, 12 insertions(+), 94 deletions(-)nathanvan@nathanvan-N61Jq:~/workspace/mcmc-chapter$ git add tex/sept2012_code/example-code-testing.R
nathanvan@nathanvan-N61Jq:~/workspace/mcmc-chapter$ git commit -a -m "adding in the example code"
[master 385c023] adding in the example code1 file changed, 331 insertions(+)create mode 100644 tex/sept2012_code/example-code-testing.R
所以希望这对未来的人们有一些用处。我很高兴它的工作
如何修改git空文件夹的错误相关推荐
- 解决Git无法同步空文件夹的问题
思路:在每个空文件夹下创建空文件,同步后再删除 1 package org.zln.module1.demo1; 2 3 import org.apache.log4j.Logger; 4 5 imp ...
- 删除空文件夹 linux,Linux中find批量删除空文件及空文件夹脚本
Linux中find批量删除空文件及空文件夹脚本 linux下批量删除空文件(大小等于0的文件)的方法 代码如下 复制代码 find . -name "" -type f -siz ...
- php递归删除空数组,php 递归删除非空文件夹示例
这篇文章主要为大家详细介绍了php 递归删除非空文件夹示例,具有一定的参考价值,可以用来参考一下. 对php递归删除非空的文件夹感兴趣的小伙伴,下面一起跟随512笔记的小编两巴掌来看看吧! /** * ...
- 服务器空文件夹无法删除怎么办,空的文件夹无法删除怎么办 空的文件夹无法删除的原因【图文】...
电脑已经不是人们生活中所陌生的产品,现在人们的娱乐.办公都会用到电脑,而在电脑被越发使用频繁的当下,出现的问题相对来说就越多了.很多时候这些小问题,却使得人们在使用电脑的过程中碰到大难题.就好比空的文 ...
- 清理Maven仓库冗余文件(lastUpdated、m2e-lastUpdated.properties、空文件夹)脚本
一.功能 定位Maven仓库的路径 查看或删除Jar包未完全下载的相关文件(*.lastUpdated) 查看或删除本地仓库目录下的空文件夹 二.脚本源码 @echo>nul 2>nul ...
- shell空文件夹查找
使用git维护代码或者文件时,git默认是不上传空文件夹的,如果是用git托管文件系统,可能就会导致好多空文件夹漏传,可以通过以下shell脚本来查找到当前目录下的所有空文件夹,并在文件夹里创建一个隐 ...
- Unity中用递归删除空文件夹和文件夹下面的子文件,meta文件保留和IO的一些操作总结
/*----------------------------------------------------------------Created by 王银文件名: FilesTools创建时间: ...
- Windows删除空文件夹问题带来的学习与思考
1.问题产生: 前段时间得到一份资源,号称有近500个G的学习资料,花了我好长时间下载下来,顺手拿了个文件查重工具查了下,发现这500个G水分很大,资料重复率很高,于是当然就会查重删除重复文件,这 ...
- Linux实现彻底清理空文件夹的方法详解
最近工作中遇到一个需求--删除指定路径下的所有空文件夹.这里的空文件夹的认定标准是:如果某个文件夹的子文件夹全是空文件夹,也认为该文件夹是空文件夹. 代码 以下是我实现的shell脚本,自测没有发现异 ...
最新文章
- 【JavaScript总结】JavaScript发展与学习内容
- 有关无人驾驶汽车的思考
- 字符编码笔记:ASCII,Unicode和UTF-8(转) + BASE64
- 【OpenCV3】模板匹配——cv::matchTemplate()详解
- qt label显示图片_qt关于qmovie类的使用
- mysql accountlevel1_mysql---修改表结构
- Git的工作流程简介
- Hyper-V Server联机调整虚拟硬盘大小
- 卡顿严重_微软Win 10游戏模式致《使命召唤:战区》等游戏出现严重卡顿现象
- html模拟在线股票走势,用HTML5实现全套股票行情图
- protobuf 2.5.0问题
- 写一段jdbc连oracle的程序java类_并实现数据查询_一段Jdbc连Oracle的程序,并实现数据查询....
- Beyond Compare Pro for Mac
- nodejs-基础:路由基础
- 求5的阶乘和1-5的阶乘和
- Android控件介绍及用法
- 卡内基梅隆大学计算机硕士专业,2020年卡内基梅隆大学专业设置
- 【论文笔记】RRU-Net: The Ringed Residual U-Net for Image Splicing Forgery Detection
- 小写数字转成大写的中文,方便财务对账专用
- OUC暑期培训(深度学习)——第六周学习记录:Vision Transformer amp; Swin Transformer