git常见问题汇总

来源:互联网 发布:windows jdk版本升级 编辑:程序博客网 时间:2024/06/05 08:56

如何添加忽略文件?

git config core.excludesfile .gitignore_list
git status
将未添加到版本库的文件追加到 .gitignore_list 文件中即可

如何从暂存区(stage,index)中移除文件?

git rm –cached file

git 合并 commit ?

使用:git rebase -i HEAD~n

非裸仓库(bare)提交失败?

修改 .git/confg ,增加如下内容:

[receive]      denyCurrentBranch = ignore  

或者
git config receive.denyCurrentBranch ignore

原创粉丝点击