’git stash list’ 命令可以将当前的Git栈信息打印出来,你只需要将找到对应的版本号,例如使用’git stash apply stash@{1}’就可以将你指定版本号为stash@{1}的工作取出来,当你将所有的栈都应用回来的时候,可以使用’git stash clear’来将栈清空。
五、上传本地项目到远程仓库情况一,不是一个git仓库
git init git add README.md git commit -m "first commit" git remote add origin git@github.com:fozero/vue-nuxt-ssr.git 关联远程仓库,需先在远程仓库创建一个同名仓库 git push -u origin master情况二,已经是一个本地git仓库
git remote add origin git@github.com:fozero/vue-nuxt-ssr.git 关联远程仓库 git push -u origin master注:
若新建远程仓库的时候自动创建了README文件,则在此之前先pull下来,git pull --rebase origin master,避免在push时报错
1、分支合并时报错
https://stackoverflow.com/questions/2314437/resolve-conflict-delete-modify-in-git git merge origin/feature-wuj-uinfo CONFLICT (modify/delete): application/views/preorderg3/newshare.html deleted in HEAD and modified in origin/feature-wuj-uinfo. Version origin/feature-wuj-uinfo of application/views/preorderg3/newshare.html left in tree. CONFLICT (modify/delete): application/views/preorderg3/newpic.html deleted in HEAD and modified in origin/feature-wuj-uinfo. Version origin/feature-wuj-uinfo of application/views/preorderg3/newpic.html left in tree. Auto-merging application/controllers/api/Reserve.php Automatic merge failed; fix conflicts and then commit the result.以上错误大致是说那个文件已经被删除了,我这边还存在,通过rm将冲突文件删除解决该问题
git rm application/views/preorderg3/newshare.html git rm application/views/preorderg3/newpic.html 七、最后有时候可以看到别人提交的时候会显示emoj表情 ,其实我们在提交的时候也可以使用,对于不同的提交类型 ,使用不同的emoj表情,这样看起来更加的一目了然
在commit时,通过在emoj前面加‘:’,如:
git ci -m ':bug: fix click of get with no feedback'更多的emoj表情可以查看
https://github.com/carloscuesta/gitmoji/
https://gitmoji.carloscuesta.me/
https://zhuanlan.zhihu.com/p/29764863