git remote prune origin 删除本地有但在远程库已经不存在的分支

简介: git remote prune origin 删除本地有但在远程库已经不存在的分支

问题1:

解决git 出现 Your account has been blocked问题

使用git 出现 Your account has been blocked

无法从远程pull代码下来

解决:

$ git push origin master


问题2:

GitLab: Your account has been blocked.

fatal: Could not read from remote repository.:

git 提交时出现以上问题

解决:

$ git remote set-url origin git@git.58haha.com:web/58haha.git


问题3

error: unable to resolve reference refs/remotes/origin/yst/downline: Not a directory

From git.58haha.com:web/58haha

! [new branch]      58haha/downline -> origin/58haha/downline  (unable toupdatelocalref)

error: somelocal refs could not be updated; try running

'git remote prune origin' to remove any old, conflicting branches

解决:

$ git remote prune origin

问题4:

git stash pop后出现冲突

git stash pop后,如果出现冲突的话,不会被drop掉,修改还在

解决:

$ git reset--hard HEAD

相关文章
|
4月前
|
存储 安全 开发工具
深度解决 Git “fatal: refusing to merge unrelated histories” 错误解析什么是历史分支优雅草卓伊凡
深度解决 Git “fatal: refusing to merge unrelated histories” 错误解析什么是历史分支优雅草卓伊凡
322 4
深度解决 Git “fatal: refusing to merge unrelated histories” 错误解析什么是历史分支优雅草卓伊凡
|
1月前
|
开发工具 git
Git版本控制工具合并分支merge命令操作流程
通过以上步聚焦于技术性和操作层面指南(guidance), 可以有效管理项目版本控制(version control), 并促进团队协作(collaboration).
187 15
|
9月前
|
开发工具 git
图解Git——分支的新建与合并《Pro Git》
在Git开发中,新建与合并分支是常见的操作。以实际开发为例:为实现新需求创建分支`iss53`进行开发;遇紧急Bug时,切换至线上分支创建`hotfix`修复并合并回线上分支,再切换回`iss53`继续工作。完成`iss53`后,切换到`master`合并。若出现冲突,使用`git status`查看,手动编辑解决冲突后标记为已解决并提交。图形化工具如`git mergetool`也可辅助解决冲突。
201 9
|
9月前
|
开发工具 git 开发者
图解Git——分支简介《Pro Git》
Git 分支是其核心特性之一,允许开发者从主开发线分离工作,避免干扰主线。传统版本控制系统创建分支效率低,而Git的分支创建和切换非常轻量高效。
482 9
|
8月前
|
开发工具 git 开发者
vscode+git解决远程分支合并冲突
通过这些详细步骤,您可以掌握如何使用VSCode和Git高效地解决远程分支合并冲突,提高开发效率和代码质量。希望这些内容对您的学习和工作有所帮助。
1786 86
|
8月前
|
开发工具 git
git 使用之remote: File [4e21e71a555febaa4dfaaa05cf7eeb606ea96ae2] size 104.090MB, exceeds quota 100MB remote: Please remove the file[s] from history and try again 报错如何解决-优雅草卓伊凡
git 使用之remote: File [4e21e71a555febaa4dfaaa05cf7eeb606ea96ae2] size 104.090MB, exceeds quota 100MB remote: Please remove the file[s] from history and try again 报错如何解决-优雅草卓伊凡
656 3
git 使用之remote: File [4e21e71a555febaa4dfaaa05cf7eeb606ea96ae2] size 104.090MB, exceeds quota 100MB remote: Please remove the file[s] from history and try again 报错如何解决-优雅草卓伊凡
|
9月前
|
存储 项目管理 开发工具
图解Git——分支开发工作流《Pro Git》
分支开发工作流利用Git的分支功能,支持灵活的项目管理。长期分支如`master`和`develop`分别保存稳定和开发中的代码;短期主题分支用于开发单一特性或修复问题,完成后合并到主分支。此模式确保代码稳定性,支持并行开发、便于审查和灵活调整。建议维护明确的长期分支,保持主题分支短小精悍,并定期清理无用分支。配置上可保护关键分支,遵循命名规范。
373 7
|
9月前
|
存储 缓存 Java
图解Git——远程分支《Pro Git》
远程分支是 Git 中用于管理分布式协作的关键概念。远程引用指向远程仓库中的分支和标签,常用 `git ls-remote` 或 `git remote show` 查看。日常开发中,通常使用远程跟踪分支(如 `origin/main`)与远程分支交互,简化远程仓库状态的管理和使用。远程跟踪分支记录远程分支的状态,但本身只读。
176 6
|
11月前
|
网络安全 开发工具 git
解决fatal:remote error:You can’t push to git://github.com/username/*.g
通过上述诊断与修复步骤,绝大多数的推送错误都能得到有效解决,确保您的Git工作流顺畅无阻。
517 1
下一篇
oss教程