git diff --cached查看修改内容可以看到增加了子模块,并且新文件下为子模块的提交hash摘要 git commit提交即完成子模块的添加 子模块的使用 克隆项目后,默认子模块目录下无任何内容。需要在项目根目录执行如下命令完成子模块的下载: git submodule init git submodule update 或: git submodule update --init --recur...
git commit --amend: 修改上一次commit信息,或者将这次的push,追加到上一次。不单独出commit。使用后再push -f,直接会上传到git上。git commit --amend --author="New Author Name <new.email@example.com>" --date='Mon, 30 Oct 2023 08:33:52 +0000' git submodule update --init --recursive 初始化...
在上一条commit中追加新的修改(不生成新的commitid) # (在上一条commit中,追加其他的文件修改,push到远程需要强制-f 方式) git commit --amend --no-edit # 变了hash值,但是message内容没有变化,最终只有一条commit git commit --amend -m "new xxxxxxxxxxxx" # 去掉--no-edit,即可修改message内容,同样...
除了用户自定义的变量外,Runner也可以定义它自己的变量。CI_COMMIT_REG_NAME就是一个很好的例子,它的值表示用于构建项目的分支或tag名称。除了在.gitlab-ci.yml中设置变量外,还有可以通过GitLab的界面上设置私有变量。 更多关于variables。 cache Gitlab Runner v0.7.0 开始引入。 cache用来指定需要在job之间缓存的...
它有什么作用?答:gitlab-ci全称是gitlab continuous integration的意思就是持续集成;gitlab-ci.yaml是Gitlab-CI做持续集成和发布的执配置文件,里面定义了如何测试、编译、以及部署阶段执行的脚本,该文件的配置高度依赖于项目本身,以及 CI/CD 流水线的需求。即每次在我们push到gitlab的时候,都会触发此脚本...
git submodule sync --recursive git submodule update --init --recursive Note that for this feature to work correctly, the submodules must be configured (in .gitmodules) with either: the HTTP(S) URL of a publicly-accessible repository, or a relative path to another repository on the same Gi...
git submodule sync --recursive git submodule update --init --recursive Note that for this feature to work correctly, the submodules must be configured (in .gitmodules) with either: the HTTP(S) URL of a publicly-accessible repository, or a relative path to another repository on the same Gi...
任何一个前置的jobs失败了,commit会标记为failed并且下一个stages的jobs都不会执行。 这有两个特殊的例子值得一提: 如果.gitlab-ci.yml中没有定义stages,那么job's stages 会默认定义为build,test和deploy。 如果一个job没有指定stage,那么这个任务会分配到teststage。
backups gitaly gitlab-ci gitlab-kas gitlab-shell logrotate node-exporter postgresql public_attributes.json trusted-certs-directory-hash-sh-4.2$ pwd/var/opt/gitlab-sh-4.2$ gitlab-rails console---Ruby: ruby2.7.7p221 (2022-11-24revision 168ec2b1e5) [x86_64-linux] GitLab:15.7.9(2aa806759...
子模块 submodule 说说分支与 Git 的 Workflow 分支 一些底层的机理,可对照 .git/objects/ 目录下内容学习。 # generate checksumgit hash-object <file>git cat-file -p <checksum># check type of object: commit blob treegit cat-file -t <checksum> 从零开始创建一个 commit git initcat > file-1.tx...