git问题处理
git-status乱码问题
解决方案
git config --global core.quotepath false
git-push配置问题
解决方案
git config --global push.default matching
git-push变基问题
报错信息
$ git push -u origin master
To git@github.com:TaylorApril/test.git
! [rejected] master -> master (fetch first)
error: failed to push some refs to 'git@github.com:TaylorApril/test.git'
hint: 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.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.
解决方案
git pull --rebase origin master
git push -u origin master
git-checkout分支领先问题
报错信息
$ git checkout master
Switched to branch 'master'
Your branch is ahead of 'origin/master' by 1 commit.
(use "git push" to publish your local commits)
解决方案
git push
git-查找不能上传的大文件
find . -type f -size +10M | xargs -r
git-lfs安装配置
# centos install gitlfs
curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.rpm.sh | sudo bash
sudo yum install git-lfs
git lfs install
# ubuntu install gitlfs
curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.deb.sh | sudo bash
sudo apt-get install git-lfs
git lfs install