git沒有特別好的圖形界面支持,工作中有個場景:在本地修改累積了n次commit,准備push之前希望確認一下修改的正確否,於是想比較兩個節點號之間的差異內容。
git自帶的git diff 是文本形式的patch查看方式,看起來比較累,希望能通過beyond compare來查看。最好的效果是列出變更的文件列表,雙擊希望查看的文件后會調用beyond compare來查看該文件的修改內容。
第一步安裝gitpython.費了我不少時間,因為偉大的牆.....
pip install gitpython 會報錯
distutils.errors.DistutilsError: Could not find suitable distribution for Requirement.parse('pbr>=0.5.21
解決方法:制定 PIP 使用國內的庫: pip install gitpython -i
http://pypi.v2ex.com/simple