gitlab常用命令

1、git clone URL // 克隆远端主分支代码到PC

2、git branch -a // 查看该repository的项目的所有分支

3、git log -1 // 查看最近一次提交记录的哈希值

4、git status // 查看本地分支名称和已更改文件列表

5、git add /iec61850/app/mms/main.c // 添加已变更文件

6、git checkout -b "Dev_debug_haoyj" Dev_debug // 从远端分支复制代码并在本地创建自己分支

7、git checkout Dev_debug(或master) // 强制切换到repository上的项目分支

8、git commit -m "revision notes" // 修改摘要

9、git push origin Dev_debug_haoyj // 推送本地代码到gitlab

10、git pull origin Dev_debug // 从远端分支更新本地代码

11、git reset --hard "hash value" // 和git log -n结合使用,用于强制切换到某个时间节点的代码

相关推荐
_可乐无糖2 天前
GitLab CI 脚本之 CI_COMMIT_AUTHOR
ci/cd·gitlab
_可乐无糖3 天前
GitLab CI 脚本之 dependencies 和 needs
ci/cd·gitlab
Fan_5584 天前
4核8G云服务器部署GitLab内存耗尽解决方案
gitlab
洋就在江州4 天前
gitlab-cicd 离线集成——springboot-cicd (非docker形式,shell形式)
java·spring boot·后端·ci/cd·gitlab·gitlab-runner
成为你的宁宁5 天前
【Ubuntu 18.04安装Gitlab】
ubuntu·gitlab
长春的KAKA5 天前
GitLab 项目页面报 500 错误的完整修复记录:PostgreSQL 数据库损坏、统计表缺失及数据库迁移
数据库·postgresql·gitlab
蓝胖的四次元口袋5 天前
GitLab知识梳理
gitlab
极小狐14 天前
CI 作业里 kubectl 连不上集群?用 Kubernetes Agent 打通部署链路的 7 个步骤
ci/cd·kubernetes·gitlab·devops·k8s部署
Zhou14113614 天前
Git_02_GitLab协作与CI_CD
git·ci/cd·gitlab
白帽攻防录14 天前
SRC 挖洞:GitLab GraphQL 指令绕过深度复盘,CVE-2026-19478 未授权删项目怎么打穿代码托管平台
网络·网络安全·gitlab·graphql