用简单的图话,分享便捷实用的功能。
推荐理由:国内访问github不稳定,且为github官方推荐的桌面端,同时支持Win和Mac端。甚至一键下载项目源码,简直太不要方便。
下载链接:desktop.github.com/
功能1:revert commit
先commit三次记录,为了方便测试。
弹出鼠标右键的菜单,点击 Revert changes in commit
存在冲突
弹出鼠标右键的菜单,点击 Open in Visual Studio Code
处理冲突
冲突处理完成
commit & push,此时revert到了commit内容为2之前的版本
功能2:git merge
点击Branch -> Merge into current branch
选择将哪个分支merge到当前分支
点击Create a merge commit,然后push
功能3:git rebase
点击Branch -> Rebase current branch,选取rebase的基分支,点击Rebase -> Begin rebase
发现冲突,点击Open in Visual Studio Code,处理冲突
冲突处理完成,点击Continue rebase
点击Force push test,完成rebase
功能4:compare two branch
将分支切到基分支,点击History -> input 输入框 -> 选取另一分支
Behind表示较dev分支,master新的commit记录。
Ahead表示较master分支,dev新的commit记录。