git rebase 避免丑陋的分支merge

git rebase 避免丑陋的分支merge
把自己的改动提交为一个commit之后

 git pull origin dev --rebase

它会先pull dev的内容,然后把自己的commit放在最后面。
优点是不会有merge那样分支合进来的git graph,而是一条直线

(aiops_api_py36)  ✘ aaa@aaa-MB1  ~/Documents/Z00_存档本地/Z30_projects/pizza_py3/pizza/aiops   rt_lines_api_simplified  git pull origin dev --rebase
remote: Enumerating objects: 1, done.
remote: Counting objects: 100% (1/1), done.
remote: Total 1 (delta 0), reused 0 (delta 0)
Unpacking objects: 100% (1/1), done.
From http://gitlab/api
 * branch            dev        -> FETCH_HEAD
   f50aa57..80eb0c6  dev        -> origin/dev
First, rewinding head to replay your work on top of it...
Applying: feature: preview API

参考

使用 git rebase 避免無謂的 merge
git最佳实践

上一篇:java基础day7-二维数组


下一篇:一次SQL Server 10054 Troubleshooting