git合并你的若干提交--rebase,然后再发起merge请求

本文详细介绍了Git的高级使用技巧,包括如何切换分支、查看提交记录、合并提交、强制推送及在Wiki中编写文档等内容。适合有一定Git基础的开发者深入学习。

第一:切换分支
git checkout sit_20190729_zhangkezhi_yinhangka4

第二:看最近提交记录
git log --oneline -10

第三:合并最近十条提交
git rebase -i head~10
在这里插入图片描述

  6                                                                 
  7 # Rebase bdc90489..ccc5859a onto bdc90489 (5 commands)          
  8 #                                                               
  9 # Commands:                                                     
 10 # p, pick <commit> = use commit                                 
 11 # r, reword <commit> = use commit, but edit the commit message  
 12 # e, edit <commit> = use commit, but stop for amending          
 13 # s, squash <commit> = use commit, but meld into previous commit
 14 # f, fixup [-C | -c] <commit> = like "squash" but keep only the previous
 15 #                    commit's log message, unless -C is used, in which case
 16 #                    keep only this commit's message; -c is same as -C but
 17 #                    opens the editor                           
 18 # x, exec <command> = run command (the rest of the line) using shell
 19 # b, break = stop here (continue rebase later with 'git rebase --continue')
 20 # d, drop <commit> = remove commit                              
 21 # l, label <label> = label current HEAD with a name             
 22 # t, reset <label> = reset HEAD to a label                      
 23 # m, merge [-C <commit> | -c <commit>] <label> [# <oneline>]    
 24 # .       create a merge commit using the original merge commit's
 25 # .       message (or the oneline, if no original merge commit was

第四:强制提交
git push -f

第五 在git的wiki中写入你的文档

在这里插入图片描述

rebase

将你提交的进行合并
git config --global pull.rebase true

在这里插入图片描述
在这里插入图片描述
https://www.codercto.com/a/45325.html
click

自己的总结:

rebase两个地方需要:
一个是你合并你提交的若干commit
另一个是将你的分支合并master,因为master中有新内容!在大公司才用的到。

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值