|
21 | 21 | + [https://github.com/jonas/tig](https://github.com/jonas/tig)
|
22 | 22 | + [https://github.com/PJK/libcbor](https://github.com/PJK/libcbor)
|
23 | 23 | + [https://github.com/Yubico/libfido2](https://github.com/Yubico/libfido2)
|
| 24 | ++ Git实现 [https://github.com/libgit2/libgit2](https://github.com/libgit2/libgit2) |
| 25 | ++ [https://github.com/go-git](https://github.com/go-git) |
| 26 | ++ Java实现 [https://github.com/eclipse-jgit/jgit](https://github.com/eclipse-jgit/jgit) |
| 27 | + + [https://github.com/centic9/jgit-cookbook](https://github.com/centic9/jgit-cookbook) |
| 28 | + + [https://github.com/clj-jgit/clj-jgit](https://github.com/clj-jgit/clj-jgit) |
| 29 | + + [https://github.com/jgitver/jgitver](https://github.com/jgitver/jgitver) |
| 30 | + + [https://github.com/ajoberstar/grgit](https://github.com/ajoberstar/grgit) |
| 31 | + + [https://github.com/jcjones/jgit](https://github.com/jcjones/jgit) |
| 32 | + + [https://github.com/seart-group](https://github.com/seart-group) |
| 33 | + + [https://github.com/tackleza/ApidechJavaGit](https://github.com/tackleza/ApidechJavaGit) |
| 34 | + + [https://github.com/quarkiverse/quarkus-jgit](https://github.com/quarkiverse/quarkus-jgit) |
| 35 | + + [https://github.com/Unity-Billal-mesloub/git](https://github.com/Unity-Billal-mesloub/git) |
| 36 | + + [https://github.com/chirontt/jgit.http.server.native](https://github.com/chirontt/jgit.http.server.native) |
| 37 | ++ [https://github.com/gitblit/gitblit](https://github.com/gitblit/gitblit) |
| 38 | + |
24 | 39 |
|
25 | 40 |
|
26 | 41 | * [https://github.com/progit](https://github.com/progit)
|
|
47 | 62 | * 自己动手写Git [https://github.com/hanyujie2002/wyag-zh](https://github.com/hanyujie2002/wyag-zh)
|
48 | 63 |
|
49 | 64 |
|
50 |
| -**GIT工具** |
| 65 | + |
| 66 | +- [git-pull.bat](/files/git-pull.bat) |
| 67 | +- [git-pull.sh](/files/git-pull.sh) |
| 68 | + |
| 69 | + |
| 70 | +> 脚本没有写的权限:在`git-bash.exe`文件或快捷方式上鼠标`右键` -> `属性` -> `兼容性` -> 勾选`以管理员身份运行此程序` -> `确定` |
| 71 | +
|
| 72 | + |
| 73 | +**[Commit提交规范](/Other/编程规范.md#commit提交规范)** |
| 74 | + |
| 75 | + |
| 76 | +> `--global`代表全局,保存的配置在用户目录中,Windows在cmd中输入命令查看:`type %USERPROFILE%\.gitconfig` |
| 77 | +
|
| 78 | +- `git clone url --depth 1` 克隆最新一条提交记录 |
| 79 | +- `git clone url --recursive` 递归克隆 |
| 80 | +- `git fetch --unshallow` 完整克隆 |
| 81 | + |
| 82 | + |
| 83 | + |
| 84 | +**Git与SVN区别** |
| 85 | + |
| 86 | +- git是分布式,svn是集中式; |
| 87 | +- svn只有一个中央版本库,而git有无限个; |
| 88 | +- svn有全局的版本号,git没有; |
| 89 | +- git不必联网就可以看到所有的log,svn必须联网; |
| 90 | +- git保存的是元数据,svn是复制整个文档; |
| 91 | +- git强调分支,svn只是不同的文件目录,就是copy |
| 92 | + |
| 93 | + |
| 94 | + |
| 95 | + |
| 96 | + |
| 97 | +## GIT工具 |
51 | 98 |
|
52 | 99 | * 忽略提交 [https://github.com/github/gitignore](https://github.com/github/gitignore)
|
53 | 100 | * [https://wizardzines.com/comics/inside-git](https://wizardzines.com/comics/inside-git)
|
54 | 101 | * [https://github.com/toptal/gitignore.io](https://github.com/toptal/gitignore.io)
|
55 |
| -* 编辑版本控制存储库的历史 [http://www.catb.org/esr/reposurgeon](http://www.catb.org/esr/reposurgeon) |
| 102 | +* 编辑版本控制存储库历史 [http://www.catb.org/esr/reposurgeon](http://www.catb.org/esr/reposurgeon) |
56 | 103 | * GUI [https://github.com/git-cola/git-cola](https://github.com/git-cola/git-cola)
|
57 | 104 | * [https://github.com/prati0100/git-gui](https://github.com/prati0100/git-gui)
|
58 | 105 | * [https://github.com/extrawurst/gitui](https://github.com/extrawurst/gitui)
|
|
83 | 130 | * 删除大型blob [https://github.com/rtyley/bfg-repo-cleaner](https://github.com/rtyley/bfg-repo-cleaner)
|
84 | 131 |
|
85 | 132 |
|
86 |
| -- [git-pull.bat](/files/git-pull.bat) |
87 |
| -- [git-pull.sh](/files/git-pull.sh) |
88 | 133 |
|
| 134 | +### Git LFS |
89 | 135 |
|
90 |
| -> 脚本没有写的权限:在`git-bash.exe`文件或快捷方式上鼠标`右键` -> `属性` -> `兼容性` -> 勾选`以管理员身份运行此程序` -> `确定` |
| 136 | +* 大文件版本控制 [https://github.com/git-lfs](https://github.com/git-lfs) |
| 137 | + * [https://git-lfs.github.com](https://git-lfs.github.com) |
91 | 138 |
|
| 139 | +> Git LFS(Large File Storage, 大文件存储)可以把指定的任意文件存在 Git 仓库之外, |
| 140 | +> 而在 Git 仓库中用一个占用空间 1KB 不到的文本指针,可以减小 Git 仓库本身的体积来代替的小工具。 |
92 | 141 |
|
93 |
| -**[Commit提交规范](/Other/编程规范.md#commit提交规范)** |
| 142 | +> git每次保存diff,一些大文件发生变化时,整个仓库就会增加很大的体积,导致clone和pull的数据量大增。 |
| 143 | +> git push的时候,git lfs会截取要管理的大文件,并将其传至git lfs的服务器中,从而减小仓库的体积。 |
94 | 144 |
|
| 145 | +- `git lfs track "*.gz"` 添加文件到`.gitattributes`追踪记录文件中 |
| 146 | +- `git lfs ls-files` 显示当前提交后跟踪的文件列表 |
| 147 | +- `git lfs clone` 克隆追踪的文件 |
95 | 148 |
|
96 |
| -> `--global`代表全局,保存的配置在用户目录中,Windows在cmd中输入命令查看:`type %USERPROFILE%\.gitconfig` |
97 | 149 |
|
98 |
| -- `git clone url --depth 1` 克隆最新一条提交记录 |
99 |
| -- `git clone url --recursive` 递归克隆 |
100 |
| -- `git fetch --unshallow` 完整克隆 |
101 | 150 |
|
| 151 | +## 安装最新版 |
102 | 152 |
|
| 153 | +* [https://git-scm.com/download](https://git-scm.com/download) |
| 154 | +* [https://registry.npmmirror.com/binary.html?path=git-for-windows/](https://registry.npmmirror.com/binary.html?path=git-for-windows/) |
| 155 | +* [https://packages.endpoint.com/rhel/7/os/x86_64/git-2.24.1-1.ep7.x86_64.rpm](https://packages.endpoint.com/rhel/7/os/x86_64/git-2.24.1-1.ep7.x86_64.rpm) |
| 156 | +* [https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm](https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm) |
103 | 157 |
|
104 |
| -**Git与SVN区别** |
| 158 | +- 方式一 |
105 | 159 |
|
106 |
| -- git是分布式,svn是集中式; |
107 |
| -- svn只有一个中央版本库,而git有无限个; |
108 |
| -- svn有全局的版本号,git没有; |
109 |
| -- git不必联网就可以看到所有的log,svn必须联网; |
110 |
| -- git保存的是元数据,svn是复制整个文档; |
111 |
| -- git强调分支,svn只是不同的文件目录,就是copy |
| 160 | +```bash |
| 161 | +yum install -y http://opensource.wandisco.com/centos/7/git/x86_64/wandisco-git-release-7-2.noarch.rpm |
| 162 | +# 或者 |
| 163 | +wget http://opensource.wandisco.com/centos/7/git/x86_64/wandisco-git-release-7-2.noarch.rpm |
| 164 | +rpm -ivh wandisco-git-release-7-2.noarch.rpm |
| 165 | +``` |
112 | 166 |
|
| 167 | +- [https://github.com/iusrepo](https://github.com/iusrepo) |
| 168 | + |
| 169 | +```bash |
| 170 | +curl https://setup.ius.io | sh |
| 171 | +# 或者 |
| 172 | +yum install -y epel-release |
| 173 | +rpm -ivh https://centos7.iuscommunity.org/ius-release.rpm |
| 174 | +# 查看git包版本 |
| 175 | +yum list git2u |
| 176 | +# 安装 |
| 177 | +yum -y install git2u |
| 178 | +``` |
113 | 179 |
|
114 | 180 |
|
115 | 181 |
|
@@ -501,56 +567,6 @@ export LESSCHARSET=utf-8
|
501 | 567 | ```
|
502 | 568 |
|
503 | 569 |
|
504 |
| -## Git LFS |
505 |
| - |
506 |
| -* 对大型文件进行版本控制 [https://github.com/git-lfs](https://github.com/git-lfs) |
507 |
| - * [https://git-lfs.github.com](https://git-lfs.github.com) |
508 |
| - |
509 |
| -> Git LFS(Large File Storage, 大文件存储)可以把指定的任意文件存在 Git 仓库之外, |
510 |
| -> 而在 Git 仓库中用一个占用空间 1KB 不到的文本指针,可以减小 Git 仓库本身的体积来代替的小工具。 |
511 |
| -
|
512 |
| -> git每次保存diff,一些大文件发生变化时,整个仓库就会增加很大的体积,导致clone和pull的数据量大增。 |
513 |
| -> git push的时候,git lfs会截取要管理的大文件,并将其传至git lfs的服务器中,从而减小仓库的体积。 |
514 |
| -
|
515 |
| -- `git lfs track "*.gz"` 添加文件到`.gitattributes`追踪记录文件中 |
516 |
| -- `git lfs ls-files` 显示当前提交后跟踪的文件列表 |
517 |
| -- `git lfs clone` 克隆追踪的文件 |
518 |
| - |
519 |
| - |
520 |
| - |
521 |
| - |
522 |
| -## 安装最新版 |
523 |
| - |
524 |
| -* [https://git-scm.com/download](https://git-scm.com/download) |
525 |
| -* [https://registry.npmmirror.com/binary.html?path=git-for-windows/](https://registry.npmmirror.com/binary.html?path=git-for-windows/) |
526 |
| -* [https://packages.endpoint.com/rhel/7/os/x86_64/git-2.24.1-1.ep7.x86_64.rpm](https://packages.endpoint.com/rhel/7/os/x86_64/git-2.24.1-1.ep7.x86_64.rpm) |
527 |
| -* [https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm](https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm) |
528 |
| - |
529 |
| -- 方式一 |
530 |
| - |
531 |
| -```bash |
532 |
| -yum install -y http://opensource.wandisco.com/centos/7/git/x86_64/wandisco-git-release-7-2.noarch.rpm |
533 |
| -# 或者 |
534 |
| -wget http://opensource.wandisco.com/centos/7/git/x86_64/wandisco-git-release-7-2.noarch.rpm |
535 |
| -rpm -ivh wandisco-git-release-7-2.noarch.rpm |
536 |
| -``` |
537 |
| - |
538 |
| -- [https://github.com/iusrepo](https://github.com/iusrepo) |
539 |
| - |
540 |
| -```bash |
541 |
| -curl https://setup.ius.io | sh |
542 |
| -# 或者 |
543 |
| -yum install -y epel-release |
544 |
| -rpm -ivh https://centos7.iuscommunity.org/ius-release.rpm |
545 |
| -# 查看git包版本 |
546 |
| -yum list git2u |
547 |
| -# 安装 |
548 |
| -yum -y install git2u |
549 |
| -``` |
550 |
| - |
551 |
| - |
552 |
| - |
553 |
| - |
554 | 570 |
|
555 | 571 | ## 常见问题处理
|
556 | 572 |
|
|
0 commit comments