Git 仓库瘦身

Git 仓库瘦身

随着时间的推移,Git 存储库变得越来越大,或者自己误操作,把 node_moduoles.yarn.DS_Sore 这种大文件上传到远程仓库中,虽然后期把他们移除了,但还是会使仓库体积变大,获取仓库变得更慢,每个人都必须下载文件,因此我们需要缩减 Git 仓库体积。

阅读更多
git-pull-default

git-pull-default

问题背景

当使用 git 版本为 2.27.0 以上时,使用git pull命令出现以下的警告:

1
2
3
4
5
6
7
8
9
10
11
12
hint: Pulling without specifying how to reconcile divergent branches is
hint: discouraged. You can squelch this message by running one of the following
hint: commands sometime before your next pull:
hint:
hint: git config pull.rebase false # merge (the default strategy)
hint: git config pull.rebase true # rebase
hint: git config pull.ff only # fast-forward only
hint:
hint: You can replace "git config" with "git config --global" to set a default
hint: preference for all repositories. You can also pass --rebase, --no-rebase,
hint: or --ff-only on the command line to override the configured default per
hint: invocation.
阅读更多
git-repository

git-repository

本文讲述如何上传本地代码到远程的空仓库。

阅读更多
Husky hooks skipped

Husky hooks skipped

sourceTree遇到使用husky 会报错的情况:

error
1
2
3
....
Can't find yarn in PATH:......
Skipping pre-push hook
阅读更多
git仓库的代理

git仓库的代理

因为种种原因,github访问很困难,仓库代码的提交比较受限,因此想到通过挂代理的方式让代码可以正常提交。

阅读更多
工程化配置 git commit 规范

工程化配置 git commit 规范

如果你团队的 git commit 信息紊乱,太过糟糕,觉得有必要统一规范 commit格式,又或者你是一个强迫症患者,有必要让 commit 信息整整齐齐的展示。那么,你可以往下瞅瞅。

阅读更多
Git提交信息规范