将dev分支的代码完全覆盖到master上。
1. git checkout master
2. git reset --hard dev
3. git push origin master --force
若被覆盖的分支有处于受保护(protected)的状态,则执行push操作后会报错:
4. remote: GitLab: You are not allowed to force push code to a protected branch on this project.
5. To https://git.xxx.cn/xxx/xxx.git
6. ! [remote rejected] master -> master (pre-receive hook declined)