两侧同时换到之前的修订记录 前一修订版 后一修订版 | 前一修订版 |
public:it:git [2024/07/19 10:12] – [Installation] oakfire | public:it:git [2025/08/11 11:18] (当前版本) – [Ignore] oakfire |
---|
* [[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 ==== |
* [[http://git-scm.com/docs/gitignore|gitignore]] | * [[http://git-scm.com/docs/gitignore|gitignore]] |
| * 白名单的写法为:<code> |
| * |
| |
| !.gitignore |
| |
| # whitelist `src` directories and their children, regardless of place |
| !src/ |
| !src/**/ |
| !src/**/*.h |
| !src/**/*.cpp |
| |
| !/docs/ |
| !/docs/*.md |
| </code> |
==== Submodule ==== | ==== Submodule ==== |
* 参考[[http://josephjiang.com/entry.php?id=342|Git Submodule 的認識與正確使用!]] | * 参考[[http://josephjiang.com/entry.php?id=342|Git Submodule 的認識與正確使用!]] |
* 从历史记录删除:'' 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 ==== |
但对使用者来说, 命令的正交性不强这一点, 就造成了使用者需要记住大量单独的命令. | 但对使用者来说, 命令的正交性不强这一点, 就造成了使用者需要记住大量单独的命令. |
考虑找个或弄个简化版的本地版本控制系统, 或者做个git的命令包装. | 考虑找个或弄个简化版的本地版本控制系统, 或者做个git的命令包装. |
这篇文章不错:https://www.highflux.io/blog/what-makes-git-hard-to-use | 这篇文章不错:https://www.highflux.io/blog/what-makes-git-hard-to-use . |
| 这个可借鉴:https://github.com/jj-vcs/jj . |
</WRAP> | </WRAP> |
| |