Skip to content

Commit

Permalink
Update git.md
Browse files Browse the repository at this point in the history
撤销操作详细信息补充
  • Loading branch information
w569638598 authored Jan 18, 2024
1 parent 53cbe58 commit 9621480
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions git.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,21 @@ git push -u origin master
//忽略指定文件
git rm .env --cached
git checkout -- .
git checkout .
```

## 撤销操作

```
以下就是 git reset 回退的方式:
git reset --mixed:版本库 -> 暂存区
git reset --soft:暂存区 -> 工作区
git reset --hard: 版本库 -> 暂存区 -> 工作区
--撤销commit文件,还未push--
git log --pretty=oneline ->简洁显示日志记录
Expand Down Expand Up @@ -83,7 +93,3 @@ git push -f origin master
```

## 同步代码
```
git rebase master
```

0 comments on commit 9621480

Please sign in to comment.