如何區分 GitHub 中的兩個分支? - How can I diff two branches in GitHub?

問題:

I am just wondering if there is a way to simply diff two branches in GitHub?我只是想知道是否有一種方法可以簡單地比較 GitHub 中的兩個分支? I know GitHub has capacity to do it because when we do code-reviews it does list out all the diffs nicely.我知道 GitHub 有能力這樣做,因爲當我們進行代碼審查時,它確實會很好地列出所有差異。 I was just wondering if there is a way to do it without any code review to compare say Branch to Branch or Commit to Commit?我只是想知道是否有一種方法可以在沒有任何代碼審查的情況下將分支與分支或承諾提交進行比較? So that when I push something to my remote branch and I want to see how my diffs are going to look like BEFORE it create a PR then it can be very helpful.因此,當我將某些內容推送到我的遠程分支時,我想看看我的差異在創建 PR 之前會是什麼樣子,那麼它會非常有幫助。

I can always be in console and do git diff but that is really not as nice and visually clear as how it shows up in web UI of GitHub.我總是可以在控制檯中執行 git diff ,但這確實不像它在 GitHub 的 Web UI 中顯示的那樣美觀和直觀。 Any ideas?有任何想法嗎?


解決方案:

參考: https://stackoom.com/en/question/2wjw2
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章