Xinu

GitHub使用记录及设置
push失败,提示网络相关问题设置如下git config --global http.proxy "l...
扫描右侧二维码阅读全文
27
2018/07

GitHub使用记录及设置

1123123.png

  1. push失败,提示网络相关问题设置如下
    git config --global http.proxy "localhost:1080"
  2. 设置用户名 邮箱
    git config --global user.name 'xxxx'

git config --global user.email 'xxx@xx.com'

  1. 初始化仓库,进入一个目录
    git init
  2. 添加文件
    git add aa.txt
  3. 提交文件
    git commit -m '提交说明'
  4. 提交历史
    git log
  5. 当前版本库状态
    git status
  6. 当前版本区别
    git diff
  7. 查看所有commit id
    git reflog
  8. 回到指定版本
    git reset --hard commitid
  9. 回到上个版本
    git reset --hard HEAD^
  10. 撤销修改
  • 未添加到暂存区 未执行 git add
    git checkout -- xx.txt
  • 已执行git add
    git reset HEAD xx.txt

git checkout -- xx.txt

错误解决

  1. git push提示 fatal: NotSupportedException encountered.
    ServicePointManager ▒▒֧▒־▒▒▒ localhost ▒▒▒▒▒Ĵ▒▒▒

git config --global http.proxy "localhost:1080"修改为
git config --global http.proxy "127.0.0.1:1080"

  1. git pull 提示 LF will be replaced by CRLF in
    git config --global core.autocrlf false

禁止自动换行

Last modification:August 29th, 2018 at 07:48 pm

Leave a Comment