git篇

  • 错误

1. 出现error: The following untracked working tree files would be overwritten by checkout
解决: $ git clean -d -fx “”
参考 http://blog.chinaunix.net/uid-23366077-id-3581375.html
2.Git冲突:commit your changes or stash them before you can merge. 解决办法
出现这个问题的原因是其他人修改了xxx.php并提交到版本库中去了,而你本地也修改了xxx.php,这时候你进行git pull操作就好出现冲突了,解决方法,在上面的提示中也说的很明确了。
https://www.cnblogs.com/wenlj/p/5866356.html
1)直接commit本地的修改 ----也一般不用这种方法
2)通过git stash ---- 通常用这种方法

git stash
git pull
git stash pop

通过git stash将工作区恢复到上次提交的内容,同时备份本地所做的修改,之后就可以正常git pull了,git pull完成后,执行git stash pop将之前本地做的修改应用到当前工作区。
**3.github多人协作
1、创建组织–创建库,创建Team(邀请成员,设置每人owner权限,保证每人都可写)
参考:https://www.cnblogs.com/zhaoyanjun/p/5882784.html

猜你喜欢

转载自blog.csdn.net/super_chenly/article/details/87971751
今日推荐