两侧同时换到之前的修订记录 前一修订版 后一修订版 | 前一修订版 |
public:it:git [2024/05/27 09:30] – [二、GIT 与 SVN 的区别] oakfire | public:it:git [2025/05/27 11:36] (当前版本) – [Usage] oakfire |
---|
* CentOS yum 默认只有1.7.1 版本, 但像github.com等网站需要高于此版本. 此时需要源码安装升级. | * CentOS yum 默认只有1.7.1 版本, 但像github.com等网站需要高于此版本. 此时需要源码安装升级. |
* 如果源码安装,[[http://github.com/git/git|github repo]], ''make'', ''make install prefix=/usr'', 如果不添加''prefix=/usr'', 默认会安装在当前home目录. | * 如果源码安装,[[http://github.com/git/git|github repo]], ''make'', ''make install prefix=/usr'', 如果不添加''prefix=/usr'', 默认会安装在当前home目录. |
| |
| ==== Tools ==== |
| * 显示仓库信息[[https://github.com/o2sh/onefetch|onefetch]], 这个不错 |
| |
==== Usage==== | ==== Usage==== |
* [[http://pcottle.github.io/learnGitBranching/|Learning git branching]] | * [[http://pcottle.github.io/learnGitBranching/|Learning git branching]] |
* [[https://nvie.com/posts/a-successful-git-branching-model/|git flow]],[[https://www.atlassian.com/git/tutorials/comparing-workflows/gitflow-workflow|gitflow-workflow]] | * [[https://nvie.com/posts/a-successful-git-branching-model/|git flow]],[[https://www.atlassian.com/git/tutorials/comparing-workflows/gitflow-workflow|gitflow-workflow]] |
| * [[https://jvns.ca/blog/2024/01/26/inside-git/|Inside .git]], 介绍 .git 文件夹内容 |
| * [[https://blog.gitbutler.com/how-git-core-devs-configure-git/| git config 的一些设置技巧]] |
| |
==== Ignore ==== | ==== Ignore ==== |
* 从历史记录删除:'' git filter-branch -f --index-filter 'git rm --cached --ignore-unmatch "your/big.file"' HEAD --all '' | * 从历史记录删除:'' git filter-branch -f --index-filter 'git rm --cached --ignore-unmatch "your/big.file"' HEAD --all '' |
* 显示差异时忽略行尾空格差异: <code bash>git diff --ignore-space-at-eol</code> | * 显示差异时忽略行尾空格差异: <code bash>git diff --ignore-space-at-eol</code> |
| * git log 中文显示为尖括号码,修正方式:''export LESSCHARSET=utf-8'' |
| |
==== server: gitolite ==== | ==== server: gitolite ==== |