随笔分类 - Git
摘要:# Git Diff ## 名称 git-diff - 显示两个提交,提交和工作树等等之间的变化 ## 语法 ```shell git diff [] [] [--] […] ## 这个模式默认是比较工作树和提交之间的变化,如果不指定commit,则是和索引区比较 git diff [] --ca
阅读全文
摘要:Git Restore 名称 git-Restore - 恢复工作树文件 这个命令是试验性的。其行为可能会改变。 语法 git restore [<options>] [--source=<tree>] [--staged] [--worktree] [--] <pathspec>… git re
阅读全文
摘要:Git Reset 名称 git-Reset - 重置当前HEAD到指定的状态或者复制条目到索引 语法 git reset [-q] [<tree-ish>] [--] <pathspec> git reset [-q] [--pathspec-from-file=<file> [--pathspe
阅读全文
摘要:Git Worktree 名称 git-worktree - 管理附加到同一存储库的多个工作树。 语法 git worktree add [-f] [--detach] [--checkout] [--lock [--reason <string>]] [-b <new-branch>] <path
阅读全文
摘要:内部原理 初始化一个Git目录 $ git init Initialized empty Git repository in D:/VSCode/testGit/.git/ ## 新初始化的 .git 目录的典型结构如下: $ ls -Fl total 7 -rw-r--r-- 1 xuyuansh
阅读全文
摘要:Git底层命令 一、git hash-object 计算对象 ID 并可选择从文件创建 blob。(Compute object ID and optionally creates a blob from a file) 语法 git hash-object [-t <type>] [-w] [--
阅读全文
摘要:Git Branch 名称 git-branch - 列出、创建或删除分支(List, create, or delete branches) 语法 git branch [--color[=<when>] | --no-color] [--show-current] [-v [--abbrev=<
阅读全文
摘要:Git Checkout 名称 git-Checkout - 切换分支或恢复工作树文件 语法 git checkout [-q] [-f] [-m] [<branch>] git checkout [-q] [-f] [-m] --detach [<branch>] git checkout [-q
阅读全文
摘要:Git Init 名称 git-init- 语法(概要) git init [-q | --quiet] [--bare] [--template=<template-directory>] [--separate-git-dir <git-dir>] [--object-format=<forma
阅读全文
摘要:Git Rebase 名称 git-rebase - 在另一个基本提示之上重新应用提交(Reapply commits on top of another base tip) 语法(概要) git rebase [-i | --interactive] [<options>] [--exec <cm
阅读全文
摘要:Git Merge 名称 git-merge - 将两个或多个开发历史合并到一起 语法 git merge [-n] [--stat] [--no-commit] [--squash] [--[no-]edit] [--no-verify] [-s <strategy>] [-X <strategy
阅读全文
摘要:Git Config 名称 git config 查看、编辑Git的配置文件 配置文件的范围和语法 $ git config usage: it config [<options>] Config file location --global use global config file/全局配置文
阅读全文
摘要:Git Show 名称 git-show - 显示各种类型的对象 概述 git show [<options>] [<object>…] 描述 显示一个或多个对象(blob、树、标签和提交)。 对于提交,它显示日志消息和文本差异。它还以 git diff-tree --cc 生成的特殊格式呈现合并
阅读全文
摘要:Git Log 名称 git-log - 显示提交日志 概述 git log [<options>] [<revision-range>] [[--] <path>…] 描述 显示提交日志。 Missing zh_HANS-CN/rev-list-description.txt See origin
阅读全文

浙公网安备 33010602011771号