Git interactive rebase no commits to pick

前端 未结 4 1243
無奈伤痛
無奈伤痛 2021-01-30 07:44

I\'m on master and I did rebase -i

Got this:

noop

# Rebase c947bec..7e259d3 onto c947bec
#
# Commands:
#  p, pick = use c         


        
4条回答
  •  既然无缘
    2021-01-30 08:34

    rebase -i without a commit range will not display any commits. to rebase the last, say, 7 commits use the following:

    git rebase -i HEAD~7
    

    be careful though, that this will rewrite history. don't do it, if the commits are already pushed


    for your second question: have a branch with your changes (basically a configuration branch) and regularly merge the other branches into it. this way the changes will not move to other branches

提交回复
热议问题