fatal: Not a git repository (or
2021-11-04 本文已影响0人
天空中的球
昨天不知道操作了一个啥,发现任何
git clone
下来的库,再次git pull
的时候,都是这个显示
直接按照提示解决就如下,但是每次都这样。。。。
git init
但是接下来是这样的 Pulling without specifying how to reconcile divergent branches is discouraged
hint: Pulling without specifying how to reconcile divergent branches is
hint: discouraged. You can squelch this message by running one of the following
hint: commands sometime before your next pull:
hint:
hint: git config pull.rebase false # merge (the default strategy)
hint: git config pull.rebase true # rebase
hint: git config pull.ff only # fast-forward only
hint:
hint: You can replace "git config" with "git config --global" to set a default
hint: preference for all repositories. You can also pass --rebase, --no-rebase,
hint: or --ff-only on the command line to override the configured default per
hint: invocation.
There is no tracking information for the current branch.
Please specify which branch you want to merge with.
See git-pull(1) for details.
git pull <remote> <branch>
If you wish to set tracking information for this branch you can do so with:
git branch --set-upstream-to=<remote>/<branch> master
接下来解决
git branch --set-upstream-to=origin/master master
git pull
git config pull.rebase false
git config --global pull.rebase false
每次都这样就很烦了,后面通过
--global
配置的,才规避了