合并分支
合并分支前必须保证本地文件已提交
首先把 切换到master分支上 --- git checkout master
在add commit之后 如果切换分支报错
git 报错:
error: Your local changes to the following files would be overwritten by checkout:
.idea/workspace.xml
Please commit your changes or stash them before you switch branches.
Aborting
解决:
git add .idea/workspace.xml
git commit -m'add .idea/workspace.xml'
提交完了再切换分支
git checkout master // 切换分支
分支切换完成后
如果是多人开发的话 需要把远程master上的代码pull下来
git pull origin master
如果是自己一个开发就没有必要了 为了保险期间还是pull
合并分支
git merge 要合并的分支名称
合并后有冲突就解决冲突并提交
提交完了跑一下 看看有没有问题
问题
Git 打不开
突然发现github打不开了 手机也不行 以为网站出了问题
第二天依旧打不开。。。
手机断网4G可以。。。无语
解决方式
C:WindowsSystem32driversetc
hosts文件,记事本打开添加如下内容:
#github
192.30.253.112 github.com
151.101.113.194 github.global.ssl.fastly.net
**粗体** _斜体_ [链接](http://example.com) `代码` - 列表 > 引用
。你还可以使用@
来通知其他用户。