Git常见问题

1. 如何删除不小心提交到git远程仓库的.iml .idea等文件

git rm --cached *.iml # 不删除物理文件,仅将该文件从缓存中删除
git commit -m 'delete .iml'
git push origin master

2.代码库修改密码后push不上去怎么办?

// 重新输入密码
git config --system --unset credential.helper
 
// 密码存储同步
git config --global credential.helper store
原文地址:https://www.cnblogs.com/PersonalDiary/p/12909093.html