首页 > 其他 > 详细

git 常见问题

时间:2021-01-16 01:14:35      阅读:34      评论:0      收藏:0      [点我收藏+]

1. Git推送遇到 Updates were rejected because the remote contains work that you do

hint: not have locally. This is usually caused by another repository pushing
hint: to the same ref. You may want to first integrate the remote changes
hint: (e.g., ‘git pull …’) before pushing again.

原因:新推送的的分支与项目分支没有进行关联。
解决方案;
在项目根目录中右键选择“Git Bash Here”进入Git命令终端:
输入:git branch --set-upstream-to=origin/<branch> master
回车。

技术分享图片

 

 然后再次推送就可以了。

2. Git Bash终端中文输出显示乱码解决方案

1、打开自己的终端后,输入指令后,查看到显示中文出现乱码情况
技术分享图片
2、在多终端的空白处,点击鼠标右键,弹出的菜单中选择【options…】
3、 弹出的菜单中找到【Text】->【Local】,下拉菜单中选择zh_CN
技术分享图片
4、在【Character set】下拉菜单中选择【utf-8】,既是选择简体中文,最后点击apply
技术分享图片
5、执行命令: git config --global core.quotepath false ,执行命令git status显示结果
技术分享图片
6、执行命令git diff,显示中文信息
技术分享图片

 

git 常见问题

原文:https://www.cnblogs.com/xinmomoyan/p/14284025.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!