我知道有些人git pull --rebase默认使用,有些人坚持不使用它.我相信我理解合并和变基之间的区别,但我试图把它放在上下文中git pull.它只是不想看到很多合并提交消息,还是有其他问题?
我还是git新手.我修改了一些源文件并提交了.然后,我做到了git push.但是,我收到了这个错误.
To /foo/bar/ ! [rejected] master -> master (non-fast-forward)
error: failed to push some refs to '/foo/bar/' To prevent you from
losing history, non-fast-forward updates were rejected Merge the
remote changes before pushing again. See the 'Note about
fast-forwards' section of 'git push --help' for details.
Run Code Online (Sandbox Code Playgroud)
这似乎拒绝,我也没有git pull之前push.所以,我做到了git pull.好的,其他人有两个修改过的文件.
然后,我 git push成功了.
问题:在这种情况下,我会看到一个更多的日志,如下面的原始提交消息:
commit 59e04ce13b8afa...
Merge: 64240ba 76008a5
Author: Jone Doe <jone@doe.com>
Date: Fri Mar 15 11:08:55 2013 -0700 …Run Code Online (Sandbox Code Playgroud)