zoukankan      html  css  js  c++  java
  • git 常见问题

    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,显示中文信息
    在这里插入图片描述

  • 相关阅读:
    12.27 cf div3 解题报告
    网络流24题 P2754 [CTSC1999]家园
    P3690 【模板】Link Cut Tree (动态树)
    P2147 [SDOI2008]洞穴勘测
    P3203 [HNOI2010]弹飞绵羊
    P4172 [WC2006]水管局长
    P3979 遥远的国度
    P3128 [USACO15DEC]最大流Max Flow
    P3178 [HAOI2015]树上操作
    [SDOI2014]旅行
  • 原文地址:https://www.cnblogs.com/xinmomoyan/p/14284025.html
Copyright © 2011-2022 走看看