Git 相关

一、中文乱码

git config --global core.quotepath false # 显示 status 编码
git config --global gui.encoding utf-8    # 图形界面编码
git config --global i18n.commitencoding utf-8  # 提交信息编码
git config --global i18n.logoutputencoding gbk # 输出 log 编码
export LESSCHARSET=utf-8

二、切换到远程分支

如果没有clone,先clone

git clone ...

查看远程分支

git branch -a

* master
  remotes/origin/HEAD -> origin/master
  remotes/origin/Release
  remotes/origin/master

切换到 origin/Release分支,并在本地新建分支 myRelease

git checkout -b myRelease origin/Release

Branch myRelease set up to track remote branch Release from origin.
Switched to a new branch 'myRelease'

posted @ 2018-06-11 11:47  程序员大叔  阅读(131)  评论(0编辑  收藏  举报