Git Commit Message 规范

在 GitHub 上大多数知名项目的 Git Commit Message 其实都没有具体的规范,其他更多的仓库的 Git Commit Message 更是五花八门,有的甚至没有写 Commit Message 或乱写。

规范的 Commit Message 在 review 代码的时候会更清晰,甚至通过 conventional-changelog 可以根据规范的 Commit 自动生成 changlogs 和 release notes。

You are about to commit CRLF line separators to the Git repository...

接手一个项目,提交代码的时候报错弹出如下提示框:

JetBrains 家的 IDE 真的很智能了,你看 Fix 按钮都给你做了。
大多数人看到这个提示框可能直接点了 Fix 按钮,但却不知道它 Fix 了什么?甚至 CRLF 是什么都不知道。

解决Sourcetree 无法获取 GitHub 远端组织中的仓库

使用 Sourcetree 可以让你将更多精力和时间放在编写代码上,它能大大提供生产力。

之前 GitHub 上的仓库一直都是通过 Git 命令克隆下来的,想着就那么几行命令,也不耽误时间。但是今天突然要拉取某一个组织中的仓库,但是一时想不起来仓库名称,于是便想到 Sourtree 的主界面的远端功能可以搜索仓库,而且可以不执行命令行通过 UI 操作就能完成克隆,这样可以节省点时间,何不试试呢!由于个人仓库列表有点多,于是尝试几个关键字发现搜索不到,后来连组织名称都不在列表中。

于是便有这篇文章。

remote: Support for password authentication was removed on August 13, 2021. Please use a personal access token instead.

今天从 GitHub 上拉取代码时,报如下错误:

shell
1
2
remote: Support for password authentication was removed on August 13, 2021. Please use a personal access token instead.
remote: Please see https://github.blog/2020-12-15-token-authentication-requirements-for-git-operations/ for more information.

Git LFS使用遇到的问题

1. this exceeds GitHub’s file size limit of 100.00MB

对于大型文件的版本控制,我按照https://git-lfs.github.com/ 操作后,还是提示下图error:

image-20210521163920147

接着我运行命令git lfs track ,该命令的作用是显示 Git LFS 当前正在跟踪的所有模式的列表(以及它们在其中定义的.gitattributes 文件)。