在Linux如果要提交的文件名是中文的,默认git commit的时候就会把中文显示为一串数字如下:
create mode 100644 "\346\265\213\350\257\225"这个时候只需要添加相应的配置即可显示正常的中文,执行以下命令即可
$ git config --global core.quotepath false (git config core.quotepath false)或者手动更改配置文件~/.gitconfig,编辑添加如下内容即可:
[core]
quotepath = false
提交代码的模板:
[commit]
template = /home/archermind/.git-template
repo
repo forall -c 'git reset --hard HEAD;git clean -df;git rebase --abort'撤销整个工程的本地修改
repo start新建一个分支
repo sync -d . 时出现:
prior sync failed; rebase still in progress
resolve: git rebase --abort
"git push 出错:
error: unpack failed: error Missing tree 9cf870275fb9a364067002c85a88cee9afab5de4"
git push --no-thin ******
查看本地分支:
git branch
查看本地分支和远程分支:
git branch -a
显示远程仓库:
git remote -v
忽略文件权限或文件拥有者的改变
git config core.filemode false
转载于:https://my.oschina.net/igiantpanda/blog/2222396