Hob*_* C. 4 git git-repo git-history
首先,我做了一个浅克隆。之后,我发现一些旧的提交引入了一些大文件。例如,这些旧的提交一次又一次地替换了二进制文件。
现在,我不希望我的本地存储库包含这些重大更改。如何在不重新创建新存储库的情况下缩短历史记录git clone --depth=10?
# shallow clone
git clone --depth 100 ssh://git@10.7.222.111:/home/my_repository01.git
git log --oneline | wc -l # the result is 100
# Now, how can I shorten the current history to 10?
# Otherwise, I need to execute `git clone --depth=10` to recreate the repository.
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
485 次 |
| 最近记录: |