随笔分类 -  git

摘要:一,代码: #!/bin/bash branch=$(git branch --show-current) echo "当前分支: $branch" comment="" if [ -z "$1" ]; then echo "没有提供参数" comment="$branch 分支--$(date)" 阅读全文
posted @ 2026-02-06 22:37 刘宏缔的架构森林 阅读(3) 评论(0) 推荐(0)
摘要:解决: 增加-m参数可以看到merge的修改 $ git log -p -m app/models/banners.py 手册说明: -m This flag makes the merge commits show the full diff like regular commits; for e 阅读全文
posted @ 2026-01-19 14:03 刘宏缔的架构森林 阅读(5) 评论(0) 推荐(0)
摘要:一,报错信息: fatal: 协议错误:错误的行长度字符串:This 或 fatal: protocol error: bad line length character: This 二,出现的原因: 我修改了git项目的remote地址,是因为gitolite服务换了一台服务器,报错的原因是因为新 阅读全文
posted @ 2025-09-20 09:51 刘宏缔的架构森林 阅读(154) 评论(0) 推荐(0)
摘要:一,find命令: $ find ./ -type f -name .gitignore ./public/static/.gitignore ./vendor/aliyuncs/oss-sdk-php/.gitignore ./vendor/league/flysystem-cached-adap 阅读全文
posted @ 2025-08-23 09:29 刘宏缔的架构森林 阅读(12) 评论(0) 推荐(0)
摘要:一,列出stash $ git stash list stash@{0}: WIP on devel: a6aff4e 删除vendor下.gitignore stash@{1}: WIP on devel: 2a32258 清空git缓存 二,删除一个stash $ git stash drop 阅读全文
posted @ 2025-08-23 09:29 刘宏缔的架构森林 阅读(12) 评论(0) 推荐(0)
摘要:一,实际的未跟踪文件可能和.gitignore不一致, 此时我们用这个命令列出未跟踪的文件: git status --ignored 例子: $ git status --ignored 位于分支 devel 忽略的文件: (使用 "git add -f <文件>..." 以包含要提交的内容) . 阅读全文
posted @ 2025-08-23 09:29 刘宏缔的架构森林 阅读(46) 评论(0) 推荐(0)
摘要:一,thinkphp默认忽略/vendor目录 默认的.gitignore文件: *.log .env composer.phar composer.lock .DS_Store Thumbs.db /.idea /.vscode /vendor /.settings /.buildpath /.p 阅读全文
posted @ 2025-01-01 19:19 刘宏缔的架构森林 阅读(83) 评论(0) 推荐(0)
摘要:一,git项目管理端添加项目:(gitolite) # vi gitolite.conf # git add -A # git commit -m "add a project:lhdadm"; # git push origin master 二,客户端初始化项目 1, 先创建项目 $ git i 阅读全文
posted @ 2025-01-01 19:19 刘宏缔的架构森林 阅读(663) 评论(0) 推荐(0)
摘要:一,报错信息: hint: Diverging branches can't be fast-forwarded, you need to either: hint: hint: git merge --no-ff hint: hint: or: hint: hint: git rebase hin 阅读全文
posted @ 2024-12-28 09:32 刘宏缔的架构森林 阅读(474) 评论(0) 推荐(0)
摘要:一,为指定commit打tag: # git tag 'v1.0.1' f172507f3e9eaf6edb13042f51a52934e48925b7 查看tag列表: # git tag v1.0.1 二,从tag获取当前版本: 展示当前分支的最近的 tag # git describe --t 阅读全文
posted @ 2024-12-07 10:50 刘宏缔的架构森林 阅读(236) 评论(0) 推荐(0)
摘要:一,问题的现象: 1,安装laravel/ui这个第三方库后,它的文件不出现在未跟踪文件中,如下: liuhongdi@lhdpc:/web/api/vendor/laravel/ui$ git ls-files ./ liuhongdi@lhdpc:/web/api/vendor/laravel/ 阅读全文
posted @ 2024-09-25 19:21 刘宏缔的架构森林 阅读(391) 评论(0) 推荐(0)
摘要:一,关于gitolite 1,官网: https://gitolite.com/gitolite/index.html 2,代码网站: https://github.com/sitaramc/gitolite 3,说明: 3个角色: git服务器,上面运行gitolite/ssh服务 管理服务器:用 阅读全文
posted @ 2024-07-16 09:41 刘宏缔的架构森林 阅读(147) 评论(0) 推荐(0)
摘要:一,第一种方法:用remove命令删除origin 例子:我们把地址从apiweb1修改为apiweb2 查看remote liuhongdi@lhdpc:/data/vue/apiweb$ git remote -v origin https://gitee.com/liuhongdi/apiwe 阅读全文
posted @ 2021-09-24 16:04 刘宏缔的架构森林 阅读(381) 评论(0) 推荐(0)
摘要:一,在新机器上操作,生成免密登录的密钥: 1,创建无需密码登录 创建密钥 liuhongdi@lhdpc:~# ls .ssh ls: 无法访问 '.ssh': 没有那个文件或目录 生成密钥,一路回车即可 liuhongdi@lhdpc:~# ssh-keygen -t rsa Generating 阅读全文
posted @ 2021-09-16 15:57 刘宏缔的架构森林 阅读(114) 评论(0) 推荐(0)
摘要:一,登录到gitee后,创建项目 如图: 项目创建完成后,可以看到项目的相关信息 如何上传代码的信息已经写的很清楚了 说明:刘宏缔的架构森林是一个专注架构的博客, 网站:https://blog.imgtouch.com本文: https://blog.imgtouch.com/index.php/ 阅读全文
posted @ 2021-08-25 10:45 刘宏缔的架构森林 阅读(231) 评论(0) 推荐(0)
摘要:零,centos8平台如何安装gitosis服务? 参见:centos8平台安装gitosis服务: https://imgtouch.com/index.php/2023/05/20/centos8-linux%e5%ae%89%e8%a3%85gitosis%e6%9c%8d%e5%8a%a1g 阅读全文
posted @ 2020-03-10 17:24 刘宏缔的架构森林 阅读(445) 评论(0) 推荐(0)
摘要:一,git服务器端:准备gitosis需要的各依赖软件 1,确认openssh是否存在?如不存在,以下列命令进行安装 [root@yjweb ~]# yum install openssh openssh-server openssh-clients 2,安装git [root@yjweb ~]# 阅读全文
posted @ 2020-03-10 16:45 刘宏缔的架构森林 阅读(363) 评论(0) 推荐(0)
摘要:一,git reset的功能: 该命令修改HEAD的位置,即将HEAD指向的位置改变为之前存在的某个版本, 说明: 修改后,push到远程仓库时需要使用“git push -f”提交更改 原因:因为我们本地库HEAD指向的版本比远程库的要旧 说明:架构森林是一个专注架构的博客, 网站:https:/ 阅读全文
posted @ 2020-02-17 20:17 刘宏缔的架构森林 阅读(680) 评论(0) 推荐(0)
摘要:一,git stash的作用: 能够将所有未提交的修改(工作区和暂存区)保存至堆栈中,用于后续恢复当前工作目录 说明:架构森林是一个专注架构的博客, 网站:https://blog.imgtouch.com本文: https://blog.imgtouch.com/index.php/2023/05 阅读全文
posted @ 2020-02-17 20:03 刘宏缔的架构森林 阅读(477) 评论(0) 推荐(0)
摘要:一,git的tag是什么? tag就是给commit起一个容易记忆容易理解的名字 说明:架构森林是一个专注架构的博客, 网站:https://blog.imgtouch.com本文: https://blog.imgtouch.com/index.php/2023/05/16/gittag-de-y 阅读全文
posted @ 2020-02-17 19:50 刘宏缔的架构森林 阅读(240) 评论(0) 推荐(0)