🗒️Git 冲突 conflict
2019-7-26
| 2024-8-22
字数 262阅读时长 1 分钟
type
status
date
slug
summary
tags
category
icon
password
comment
update_time
Aug 22, 2024 07:27 AM
create_time
Aug 22, 2024 07:23 AM

遇到问题

Can't Update No tracked branch configured for branch master or the branch doesn't exist. To make your branch track a remote branch call, for example, …

解决方法

遇到冲突 (conflict) 怎么办

  1. git stash: 备份当前的工作区的内容,从最近的一次提交中读取相关内容,让工作区保证和上次提交的内容一致。同时,将当前的工作区内容保存到 Git 栈中。
  1. git pull: 拉取服务器上的代码; git stash pop: 从 Git 栈中读取最近一次保存的内容,恢复工作区的相关内容。由于可能存在多个 Stash 的内容,所以用栈来管理,pop 会从最近的一个 stash 中读取内容并恢复。
  1. git stash list: 显示 Git 栈内的所有备份,可以利用这个列表来决定从哪个地方恢复。
  1. git stash clear: 清空 Git 栈。此时原来 Stash 的那些节点都消失了。
 
PS: 写在 Sticky Notes 里,找不到链接了
 
  • Java
  • 自己常用的 Linux 命令基于 中国标准时间 的字符串格式转换
    Loading...