Skip to content

Commit be49cb0

Browse files
committed
update post using git
1 parent 0012068 commit be49cb0

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

一些技巧/使用 git.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ categories:
44
- 一些技巧
55
abbrlink: 13ca1b18
66
date: 2024-04-24 20:15:00
7-
updated: 2024-11-28 20:05:00
7+
updated: 2025-03-24 22:45:00
88
---
99

1010
<meta name="referrer" content="no-referrer"/>
@@ -91,4 +91,5 @@ updated: 2024-11-28 20:05:00
9191
- git 项目文件大小优化(去除大文件):[https://www.cnblogs.com/fuhua/p/15527023.html](https://www.cnblogs.com/fuhua/p/15527023.html)
9292
- 注意 git rev-list 和 git filter-branch 命令是可以指定分支的。默认是全部分支,也就是 --all。如果需要指定分支将 --all 替换为对应分支即可,例如 master。这样可以过滤非必要分支,例如 gh-pages。
9393
- 移除某个目录下所有文件的引用,命令 `git filter-branch --force --prune-empty --index-filter 'git rm -rf --cached --ignore-unmatch report/app/public/pdf/*.*' --tag-name-filter cat -- --all``*.*` 建议替换为 `*` 防止无法匹配无后缀的文件,例如 Makefile。另外例如想要匹配任何目录下名为 images 的目录可使用 `*/images/*`
94+
- git 遇到类似 error: cannot lock ref 'refs/remotes/origin/master': unable to resolve reference 'refs/remotes/origin/master' 的问题:[https://blog.csdn.net/a54674/article/details/102302288](https://blog.csdn.net/a54674/article/details/102302288)
9495

0 commit comments

Comments
 (0)