Chapter 3.6 rebasing "More Interesting Rebases" example requires direct checkout of commit by SHA1 instead of branch
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức phù hợp với người mới
- 45/100
- Loại issue
- Tài liệu
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- git
- Lĩnh vực
- documentation
Hướng nghiên cứu
Read the “More Interesting Rebases” section in the Git Branching—Rebasing chapter and inspect the linked interesting-rebase-1.png diagram. Reproduce the sequence, including creating client from C3 and checking out server, to confirm where the instructions diverge. Update the example or its instructions so the branch points and rebase result match the diagram, then verify the revised sequence.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
There's no existing/similar bug report.
- I have searched the existing issues
This report is about a single actionable bug.
- I'm reporting a single actionable bug
This report is about the ProGit book, version 2, English language.
- This bug is not about a translation or old version
Bug covers book website/pdf
- I confirm the bug is about the book as found on the website/pdf
Problem is present in the Pro Git book on the website?
- This bug also affects the Pro Git book as published on the website.
Which version of the book is affected?
Source files
Describe the bug:
On page https://git-scm.com/book/en/v2/Git-Branching-Rebasing, https://git-scm.com/book/en/v2/images/interesting-rebase-1.png, I am assuming the commits are done in the order indicated by the number, e.g. C1 first then C2, C3, C4, etc. If so when C5 & C6 are created, branch server is pointing at C4. In order to get branch client to begin at C3 the user would have to use the command git checkout [C3 SHA] or similar after adding C5 & C6. If the user executes git checkout server (as I expected) the tree is wrong; client branches from C4, not C3.
Steps to reproduce:
view page https://git-scm.com/book/en/v2/Git-Branching-Rebasing, section "More Interesting Rebases"
Expected behavior:
This is not technically wrong. The client branch could have originated after a checkout of the raw C3 SHA, but if the user performs git checkout server to begin the client branch the command git rebase --onto master server client results in rebase conflicts, and it also means that "C3" is included. As a naive git user the first time I tried to follow the example I executed git checkout server not noticing that it was pointing at C4 instead of C3 before adding C8 while trying to reproduce the sequence. This led to difficulties in the rebase.
After studying the problem for a while I figured out what the issue was and performed a checkout on the raw C3 SHA before creating the client branch. This did behave as I expected, but it feels like this was not how the author intended the example to proceed.
It has just now occurred to me that immediately after creating commit C3 the user could create branch client with no commits then switch back to branch server and create commit C4. Branch client would then point at C3, and everything would work as I think is expected. To me it would be desirable to include these instructions for those of us who attempt to reproduce the flow in the diagram.
Screenshots:
No response
Additional context:
No response
Device
No response
Operating system
No response
Browser/application + version
No response
- Ngôn ngữ chính
- CSS
- Star
- 6.6k
- Fork
- 2.1k
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của progit/progit2
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
-
Semi-stale link for GitHosting Đang mởbug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
-
enhancement
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 82/100
-
enhancement
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 65/100
-
enhancement
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 62/100
Tất cả issue của progit/progit2
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
agilepathway/label-checker#640 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
BasedHardware/omi#15662 · 1 bình luận ·
-
documentation help wanted
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 90/100
-
Docs are out of date: README structure tree, "Make It Yours" pointer, CONTRIBUTING test notes Đang mởdocumentation good first issue
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
amponce/archive-movie-browser#167 ·
-
user-reported
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
Kong/developer.konghq.com#7316 ·