Skip to content

Commit

Permalink
Update content src/site/notes/OperatingSystem/Linux/git/git.md
Browse files Browse the repository at this point in the history
  • Loading branch information
1024daniel committed Feb 7, 2025
1 parent 9daae5b commit 9b53104
Showing 1 changed file with 19 additions and 5 deletions.
24 changes: 19 additions & 5 deletions src/site/notes/OperatingSystem/Linux/git/git.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,15 @@ git push

```

## 日志
### commit

```sh
# 修改上一次的
git log --amend

```

## log

```bash
git log --oneline
Expand Down Expand Up @@ -204,14 +212,20 @@ git stash clear
```bash
## 针对最近4个commit进行交互式rebase修改,
git rebase -i HEAD~4

# merge模式: 当本地和远程都有一个commit没有同步,rebase之后会额外创建一个merge commit
git config pull.rebase false
# rebase模式: 当本地和远程都有一个commit没有同步,rebase之后不会创建merge commit
git config pull.rebase true
```


![Pasted image 20250207000434.png](/img/user/OperatingSystem/Linux/git/attachments/Pasted%20image%2020250207000434.png)

### reset

```sh
git reset

```
```




0 comments on commit 9b53104

Please sign in to comment.