git问题处理


Q1

fatal: remote origin already exists.

1
git remote rm origin

Q2

取消文件跟踪

1
git rm -r --cached [filename]

Q3

fatal: refusing to merge unrelated histories

1
git pull origin master --allow-unrelated-histories

Q4

git log查看分支图

1
git log --oneline --decorate --graph --all

Q5

查看跟踪的文件

1
git ls-files

Q6

Please move or remove them before you can merge

1
git reset --hard HEAD
作者

Bruce Liu

发布于

2018-12-23

更新于

2022-11-12

许可协议

You need to set install_url to use ShareThis. Please set it in _config.yml.
You forgot to set the business or currency_code for Paypal. Please set it in _config.yml.

评论

You forgot to set the shortname for Disqus. Please set it in _config.yml.