Knowledge map advanced must read: read how large-scale map data efficient storage and retrieval>>>
Problems encountered in gitlab:
when git push origin branch_ The following error is reported in name:
fatal: ‘origin’ does not appear to be a git repository
name fatal:Could not Read from remote repository
reason:
local branch and remote branch are disconnected
solution:
CD local branch
1 Git branch
– * the master only displays the master
and then checks whether it has been pulled from the upstream
2. Git remote – V
– if there is nothing, it is disconnected from the upstream and cannot pull or push the code
3. Git remote add origin ssh://git@gitlab *********************************. git (address)
then
4 Git fetch origin
— the branch status of the drop-down list will be displayed
in the format of from ssh://gitlab. ********************************
* [new branch] XXXXX -> Origin/xxxxx
check the remote warehouse again, Display the corresponding clone address
git remote – V
– origin git://github.com/schacon/ticgit.git (fetch)
origin git://github.com/schacon/ticgit.git (push)
then check the branch
git branch – a
– * mate
remotes/origin/XXXXXX ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ https://blog.csdn.net/tanningzhong/article/de Tails/79724488
git renames the warehouse, modifies the remote warehouse address To modify the warehouse configuration, please refer to: https://blog.csdn.net/u011884440/article/details/71246572
———————
Author: huanhuaqian
source: CSDN
original text: https://blog.csdn.net/huanhuaqian/article/details/81986064
Copyright notice: This article is the original article of the blogger, please attach the blog link if you reprint it
Similar Posts:
- git:fatal: No configured push destination.
- Git | fatal: refusing to merge unrelated histories [How to Solve]
- Git Pull Error: Please specify which branch you want to merge with.
- Git Status Warming: Your branch is ahead of ‘origin/master’ by 1 commit…
- Git – Your branch and ‘origin/xxx’ have diverged
- Updates were rejected because the remote contains work that you do
- Git Unable to switch remote branches error: pathspec ‘origin/XXXX’ did not match any file(s) known to git
- Git Push hint: Updates were rejected because the remote contains work that you do hint: not have …
- Git pull does not specify an error message for the branch
- [Solved] Git pull fatal: refusing to merge unrelated histories