

清除Git仓库未托管的文件
source link: https://www.cnblogs.com/TianFang/p/13734297.html
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

需使用命令行clean git仓库的地方不多,就没有怎么记,在blog里面记录一下,下次好找。
# 删除 untracked files
git clean -f
# 连 untracked 的目录也一起删掉
git clean -fd
# 连 gitignore 的untrack 文件/目录也一起删掉 (慎用,一般这个是用来删掉编译出来的 .o之类的文件用的)
git clean -xfd
# 在用上述 git clean 前,强烈建议先加上 -n 参数来先看看会删掉哪些文件,防止重要文件被误删
git clean -nxfd
git clean -nf
git clean -nfd
Recommend
-
27
Windows XML Event Log (EVTX)单条日志清除(三)——通过解除文件占用删除当前系统单条日志记录 0x00 前言 Windows XML Event Log (EVTX)单条日志清除系列文章的第三篇,介绍第一种删除当前系统evtx日志文件单条日志记录的...
-
4
step 1git filter-branch --force --index-filter "git rm -rf --cached --ignore-unmatch filename" --prune-empty --tag-name-filter cat -- --all step2rm -rf .git/refs/original &...
-
5
MacOS 清除多余的屏幕描述文件 2021-10-07 可能就是有点强迫症吧,电脑用久了之后会发现设置的显示器选项中有一堆屏幕描述文件,这些文件是在连接到新显示器时自动生成的,但实际上常用的就那么一两台显示器,看着很烦,那就干掉吧。
-
7
避免提交非文本文件到 git 仓库 2019/02/11
-
5
Metadata Cleaner:在 Linux 中清除你在图片和文件中的痕迹-51CTO.COM Metadata Cleaner:在 Linux 中清除你在图片和文件中的痕迹 作者:LCTT geekpi 译 2022-04-06 10:34:09 摆脱元数据对增强隐...
-
8
jgit获取git仓库中的部分文件 March 20, 2019 in java ...
-
9
Git 项目仓库中的 OWNERS 文件 2020年5月21日 | 字数 1286 |
-
5
This site can’t be reached theliang.coding.me’s server IP address could not be found. ...
-
5
以前公司的一个项目代码,从2014年一直存活到了2021年,目前应该还在被使用。整个代码将近2G,git文件极大,其中很大的一个原因是代码里存放过apk文件。如此大的项目,导致下载、发布很困难。 最初打算创建一个新的远程仓库用来替换旧仓库,但是该项目涉及...
-
4
完全删除 Git 仓库的文件 2021-01-25 约 407 字 预计阅读 1 分钟 ...
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK