git 冲突

git pull 之后有冲突:

$ git pull

remote: Counting objects: 5, done.

remote: Compressing objects: 100% (2/2), done.

remote: Total 3 (delta 0), reused 0 (delta 0)

Unpacking objects: 100% (3/3), done.

From g:/software/repository/git/itheima26

50db030..a04027a  master    -> origin/master

Auto-merging readme.txt

CONFLICT (content): Merge conflict in readme.txt

Automatic merge failed; fix conflicts and then commit the result.

解决方法:

1.git mergetool

调用上面命令之后会提示你输入编辑方法,输入:beyond compare 进入编辑器.

2.编辑完之后.调用git commit -a 把当前目录中所有都提交到本地库中.

3.git push origin master 提交到远程库中.

git remote add origin https://github.com/tugenhua0707/testgit.git

<1>输入git config --global user.name "你的用户名"

<2>输入git config --global user.email "你的邮箱"

<3>输入git init

<4>输入git remote add origin 你刚才建立的项目连接

<5>输入git add .

<6>输入git commit

<7>输入git config http.postBuffer 524288000 (特别提醒: 此行是在本地设置缓存, 有些项目文件较大, 使用http无法上传,可设置此命令)

<8>输入git push -u origin master 将代码推送到gitlab端

你可能感兴趣的:(git 冲突)