webstorm中git结合码云的使用

一、   websotorm中git的分布

webstorm中git结合码云的使用

二、无新建文件

1.respository---pull 选择需要pull的分支,如develop进行pull

webstorm中git结合码云的使用
webstorm中git结合码云的使用
2.commit -m   "提交本地分支" {建议选择commit and push,若只是选择了commit,则单独走一次第3步}
3.respository---push
webstorm中git结合码云的使用
webstorm中git结合码云的使用
4.在网站上进行 pull Request,进行合并请求

webstorm中git结合码云的使用
webstorm中git结合码云的使用

三、有新建文件

1.在新建文件时候出现提示框选择是,如果没有选择是,则右键Add+

webstorm中git结合码云的使用
(没有选择是,则文件会显示红色,此时进行右键---Add+)

webstorm中git结合码云的使用

2.在Add+对文件进行保存待文件进入本地库的时候,进行“无新建文件”的1-4步的操作


四、新建分支

右下角Git:xxx,点击后NewBranch,会自动切换到新建的本地分支,并在提交的时候,会自动在远程建立相应的分支

webstorm中git结合码云的使用
webstorm中git结合码云的使用

五、解决冲突

1.更改文件后,commit(只commit不提交)
2.pull有修改(即合并)的分支
3.点击冲突的消息提示,进入到冲突文件,对文件进行修改
4.push,进行当前文件的修改


六、push不成功,提示:

git pull (自己的分支)

git pull origin develop

git pull origin develop
--allow-unrelated-histories
git push  (自己的分支)