Git 常用命令

Ignore FilesGit 删除 .gitignore 生成之前上传的文件
Access CredentialGitHub/Gitee 等托管平台添加 SSH keys
Config- Git 查看和修改用户名和邮箱
- GitHub/GitLab 为不同的项目修改提交名字 user.name 和邮箱 user.email
BranchGit 删除本地和远程分支
Remote RepositoryGit 修改远程地址
Commit- Git Commit message 和 Change log 编写规范/指南
- Change a commit message: git commit --amend
- 查找第一条提交记录: git rev-list --max-parents=0 HEAD
git show ${Commit}
BasicGit 基础操作
Install- Linux 搭建 Git 服务器
- 如何在 CentOS 7.x/6.x 安装/更新新版 Git
Developmentnpm 直接安装 GitHub/GitLab 仓库代码及 npm link 本地调试
GitLab- GitLab 指定 Runner 执行任务(CI/CD/JOB)
- Webpack 多页面&GitLab 增量构建部署模板
- 使用 GitLab CI/CD 和阿里云 CLI 自动部署前端项目
Taggit tag -a v0.0.0 -m "Release v0.0.0"
git push origin v0.0.0
Pull批量拉取/git pull 指定文件夹下面所有 Git 项目的最新代码

8 条评论

  1. reviewer
    后除
    2023年10月23日

    1. `git tag v1.0.0`:这个命令会创建一个名为 "v1.0.0" 的轻量级标签(lightweight tag)。轻量级标签是对提交的引用,它不会包含任何额外的信息,如标签创建者的名字、电子邮件和日期,也不会包含标签信息。

    2. `git tag -a v1.0.0 -m "Release v1.0.0"`:这个命令会创建一个名为 "v1.0.0" 的带注解的标签(annotated tag)。带注解的标签是存储在 Git 数据库中的完整对象,它们包含标签创建者的名字、电子邮件、日期和标签信息。通过 `-m` 参数,你可以为标签添加一个描述信息。

    回复
  2. reviewer
    Biqiasao01
    2023年6月11日

    Git Clone Branch – How to Clone a Specific Branch

    ```
    git clone -b xxx --single-branch git@xxx.com:xxx.git
    ```

    回复
  3. reviewer
    Biqiasao
    2023年6月11日
    回复
  4. reviewer
    后除
    2023年5月25日

    git tag -a v1.2.0 -m "Release v1.2.0"

    回复
  5. reviewer
    后除
    2023年3月2日

    ```
    git remote set-url origin git@github.com:mazeyqian/#.git
    ```

    回复
  6. reviewer
    后除
    2022年12月11日

    Set attributes for the single project.

    ```
    cd .git
    git config user.name "name"
    git config user.email "email"
    cat .git/config
    ```

    回复
  7. reviewer
    后除
    2022年5月21日

    git push origin v1.4.39

    回复
  8. reviewer
    后除
    2022年5月21日

    git tag -a v1.4.39 -m "Pandemic Version"

    回复

发表评论

您的电子邮箱地址不会被公开。