Skip to content

Commit 9c47a09

Browse files
committed
git rebase complement
1 parent 99ebca7 commit 9c47a09

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

README.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -692,6 +692,22 @@ A 的部份就是我們要修改的目標,B 的部分就是說明 ( 前面貼
692692

693693
簡單來說,就是目前 commit id 之後的 commit id 都會改變 ( 有點繞口 :sweat_smile: )
694694

695+
這邊補充一下,只要你用了 rebase,就會看到類似下面的圖,
696+
697+
![alt tag](https://i.imgur.com/iiDf44q.png)
698+
699+
origin/master 就是指遠端 ( romote ) 的 repo,它是和你說你現在的 repo 已經和 origin/master
700+
701+
不一樣了,所以,這時候你如果要 push,請使用 `git push --force-with-lease`
702+
703+
這邊可能有人會問,如果我希望修改第一個 commit 該怎麼辦 :question:
704+
705+
這時候可以使用,
706+
707+
```cmd
708+
git rebase -i --root
709+
```
710+
695711
### edit
696712

697713
[Youtube Tutorial - git rebase interactive - edit - PART 2](https://youtu.be/TCKjQppHxxQ)

0 commit comments

Comments
 (0)