[Git]4. Megre conflicts
2023-09-14 08:59:21 时间
/** Collaboration basics */ Understand git pull command: $ git pull -->> it does two things 1. $ git fetch //get file from remote rope 2. $ git merge master //merger with local master files Sometime you might meet this kind of situation: For example, you and Jane working at the same time but on different files, Jane finishes her work and commit files to the remote github, then remote github get updated. /**/ To https://git@pshop.com/petshop_online/petshop.git ! [rejected] master -> master (non-fast-forward) error: failed to push some refs to 'https://git@pshop.com/petshop_online/petshop.git' To prevent you from losing history, non-fast-forward updates were rejected Merge the remote changes (e.g. 'git pull') before pushing again. See the 'Note about fast-forwards' section of 'git push --help' for details. /**/ After that, you also wants to commit your files to the github: $ git push -u origin master It shows error message, because the github has been updated by Jane without your notice So what you need to do is: $ git pull Get all the updated into your local, then push them again: $ git push /** Megre conflicts */ Error message: CONFLICT (content): Merge conflict in README.txt..... This you need to add the content manually!!! After that: $ git commit -a $ git push
相关文章
- Git常用操作总结
- 彻底解决git clone以及 recursive慢的问题
- svn用户名和密码设置_git配置本地用户名密码
- Git分布式版本控制工具学习(七)
- git简单入门
- SVN 切换到 Git
- git 命令怎么删除本地分支「建议收藏」
- 记一次Git报错:refusing to merge unrelated histories
- git提交报错does not match your user account
- 【Git】安装搭建与相关概念
- git安装配置
- 版本控制构建Linux项目:Git版本控制实践(linuxgit搭建)
- 用 Git 作为聊天应用的后端
- 使用 tmux 和 Git 自定义我的 Linux 终端
- Linux下安装Git客户端的指南(linuxgit客户端)