1.取消每次都需要登录
git config --global credential.helper store
2.添加忽略文件
/.idea
/.vscode
/vendor
/runtime
composer.phar
composer.lock
*.log
.env
.DS_Store
/config/*
/.gitignore
/public/*.htaccess
3.移除缓存
git rm -r --cached .
备注 23 会把远程分支的文件删除
完善 使用
git update-index --assume-unchanged 'D:/xxx/develop/api/config/database.php'
4.删除本地分支
git branch -D xx
5.删除远程分支
git push origin --delete xx
6.git 流程
git pull origin master
git add .
git commit -am 'xx'
git push origin xxx
git checkout master
git pull origin master
git checkout xxx
git merge master
git checkout master
git pull origin master
git merge xxx
git commit -am 'xx'
git pull origin master
(git commit -a)