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,显示中文信息