![](https://img-blog.csdnimg.cn/20210514095516348.jpg?x-oss-process=image/resize,m_fixed,h_224,w_224)
git
git常用操作
风太苍
这个作者很懒,什么都没留下…
展开
-
Git :fatal: refusing to merge unrelated histories解决
问题git pull,git feach提醒fatal: refusing to merge unrelated histories解决方案在操作命令后面加–allow-unrelated-histories例如:git merge master --allow-unrelated-histories如果你是git pull或者git push报fatal: refusing to merge unrelated histories同理:git pull origin master --a原创 2021-08-06 13:15:38 · 136 阅读 · 0 评论 -
git 提交部分提交 取消暂存
有时需要提交部分修改的代码,进行如下操作即 git add path:将要提交的部分代码提交到暂存区 git stash -u -k:保存未提交的修改。 git status:此时查看git状态,则只剩下第1步提交到暂存区的文件。 git commit -m 'some messages': //提交暂存区的文件。 git pull:拉取代码进行合并。git push:推送到远端仓库。 git stash pop:恢复第2步保存的未提交的修改。取消暂存git restore原创 2021-05-14 11:02:14 · 861 阅读 · 1 评论