# 1.git push产生冲突的形成过程

X------A

hyk@hyk-linux:~/xfstests/.git (master)
$cat refs/remotes/origin/master 56a3959a96f1b5e046b3760778fd34b4911d0516 本地refs： hyk@hyk-linux:~/xfstests/.git (master)$ cat refs/heads/master

# 2.方案一：强制覆盖

There is another common situation where you may encounter non-fast-forward rejection when you try to push, and  it is possible even when you are pushing into a repository nobody else pushes into. After you push commit A yourself (in the first picture in this section), replace it with "git commit --amend" to produce commit B, and you try to push it out, because forgot that you have pushed A out already.

# 3.方案二：形成merge形式的提交历史

B---C
/     /
---X---A

# 4.方案三：形成线性的提交历史

------X-------A--------D(the diff of X and B)

• 广告
• 抄袭
• 版权
• 政治
• 色情
• 无意义
• 其他

120