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

    连接成功host警告

    Warning: Permanently added the RSA host key for IP address '13.229.188.59' to the list of known hosts.
    

    解决办法

    liunx

    vim /etc/hosts
    添加 13.229.188.59 github.com
    

    windows

    C:WindowsSystem32driversetchosts  
    添加 13.229.188.59 github.com
    

    测试:

    ssh -T git@github.com
    

    终端自动显示分支

    vi ~/.bashrc
    

    ### 显示git分支

    function git_branch {  
       branch="`git branch 2>/dev/null | grep "^*" | sed -e "s/^* //"`"  
       if [ "${branch}" != "" ];then  
           if [ "${branch}" = "(no branch)" ];then  
               branch="(`git rev-parse --short HEAD`...)"  
           fi  
           echo " ($branch)"  
       fi  
    }  
    
    export PS1='u@h [33[01;36m]W[33[01;32m]$(git_branch)[33[00m] $ '  
    

    刷新bash

    sourc e .bashrc
    
  • 相关阅读:
    C语言01
    C++面试总结更新
    Python网络爬虫与信息提取02
    Self-Driving Car 01
    Python网络爬虫与信息提取01
    Python-03
    Shell
    Python-05
    Python-04
    Python-02
  • 原文地址:https://www.cnblogs.com/jokerBi/p/11411407.html
Copyright © 2011-2022 走看看