git 学习笔记 111

runtao.zhong 于 2026-08-12 发布

git 克隆代码

git clone https://github.com/zhongruntao/zhongruntao.github.io.git

git clone + 要克隆的仓库地址

git 拉取代码

拉取代码,即更新代码,把代码从远程仓库(gitee/github)同步到本地(windows)

git pull

git 提交代码到本地暂存区

# 添加代码
# git add 需要提交的文件,(.)代表所有被修改的文件,例如提交本次修改的所有文件
git add .
# 填写本次提交的代码修改注释说明
git commit -m "注释"

git 推送代码

推送代码之前必须拉取代码

git push

git 查看修改的状态

git status

git 查看提交历史

git log

代码示例

package com.example.demo;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;

@SpringBootApplication
public class Demo1Application {

    public static void main(String[] args) {
        SpringApplication.run(Demo1Application.class, args);
    }
    
}

展示图片

demo图片

展示数学公式

\[\sqrt{x^2 + y^2} \quad \sum_{i=1}^{n} i = \frac{n(n+1)}{2}\]

行内公式写法:$a^2 + b^2 = c^2$

\[\sqrt{x^2 + y^2} \quad \sum_{i=1}^{n} i = \frac{n(n+1)}{2}\] \[\bar{x} = \frac{1}{n}\sum_{i=1}^{n} x_i\] \[f(x) = \begin{cases} x^2 & x \ge 0 \\ -x & x < 0 \end{cases}\]