在将你本地分支的代码进行提交时,可能会有冲突,解决冲突的最有效的办法:

Step1. 在本地仓库中, 更新并合并代码

git fetch origin

git rebase origin/分支名

Step2. 依据提示分别打开冲突的文件, 逐一修改冲突代码:用git status查看有冲突的文件

Step3. 所有冲突都修改完毕后, 提交修改的代码

git add -u

git rebase --continue

Step4. 更新patch

git push origin HEAD:refs/for/远程分支名

删除git stash里面的内容:

git stash list 查看都有什么内容进行stash了;

git stash clear 删除全部的stash里面的内容

git stash drop stash@{0} 这是删除第一个队列

解决冲突中git 的命令:

Resolve all conflicts manually, mark them as resolved with
"git add/rm <conflicted_files>", then run "git rebase --continue".
You can instead skip this commit: run "git rebase --skip".
To abort and get back to the state before "git rebase", run "git rebase --abort".

Logo

瓜分20万奖金 获得内推名额 丰厚实物奖励 易参与易上手

更多推荐