惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

P
Privacy & Cybersecurity Law Blog
V
V2EX
月光博客
月光博客
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
The Register - Security
The Register - Security
MongoDB | Blog
MongoDB | Blog
P
Privacy International News Feed
The Last Watchdog
The Last Watchdog
Security Archives - TechRepublic
Security Archives - TechRepublic
美团技术团队
Stack Overflow Blog
Stack Overflow Blog
博客园 - 司徒正美
博客园 - 三生石上(FineUI控件)
V
Visual Studio Blog
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
K
Kaspersky official blog
S
Secure Thoughts
T
Tenable Blog
Security Latest
Security Latest
The Cloudflare Blog
S
Security @ Cisco Blogs
H
Heimdal Security Blog
aimingoo的专栏
aimingoo的专栏
TaoSecurity Blog
TaoSecurity Blog
Blog — PlanetScale
Blog — PlanetScale
Microsoft Security Blog
Microsoft Security Blog
Schneier on Security
Schneier on Security
Webroot Blog
Webroot Blog
G
Google Developers Blog
www.infosecurity-magazine.com
www.infosecurity-magazine.com
Scott Helme
Scott Helme
IT之家
IT之家
Latest news
Latest news
The Hacker News
The Hacker News
C
Check Point Blog
T
The Exploit Database - CXSecurity.com
H
Hackread – Cybersecurity News, Data Breaches, AI and More
腾讯CDC
C
CERT Recently Published Vulnerability Notes
NISL@THU
NISL@THU
N
News | PayPal Newsroom
Forbes - Security
Forbes - Security
P
Palo Alto Networks Blog
S
Security Affairs
S
Securelist
Google Online Security Blog
Google Online Security Blog
WordPress大学
WordPress大学
Last Week in AI
Last Week in AI
C
Cybersecurity and Infrastructure Security Agency CISA
A
About on SuperTechFans

博客园 - 是谁啊?

jenkins 权限控制(用户只能看指定的项目) NoSQLBooster for MongoDB延长-试用期 使用openVPN组建企业局域网,连接之后无法访问互联网的问题解决 - 是谁啊? mac os socks5转http proxy M1 Mac Xcode模拟器无法运行 解决git“Unable to negotiate with 218.244.143.137 port 22: no matching host key type found. Their offer: ssh-rsa,ssh-dss”的问题 macos 升级后提示 python 命令需要使用命令行开发者工具,你要现在安装该工具吗 解决 Android studio 代理 Connect to 127.0.0.1:[/127.0.0.1] failed: Connection refused nginx 代理https后,应用redirect https变成http centos6无法安装nginx Postfix maillog邮件发送各阶段延时的日志记录 高德坐标系转wgs(苹果坐标系) java代码 How Do I test James Distributed Version with JMeter? springBoot项目不重新上传jar包,增量升级步骤 mac安装homebrew(国内) 企业微信会话存档消息解密(Java RSA PKCS1解密) 启动apache,将debug日志输出在console窗口 转:solr6.0配置中文分词器IK Analyzer git 忽略提交某个指定的文件(不从版本库中删除)
git pull 和本地文件冲突问题解决
是谁啊? · 2016-09-17 · via 博客园 - 是谁啊?

具体方法如下

git pull origin 分支

//出现错误

git stash  缓存起来

git pull origin 分支

git stash pop //还原

git stash clear

参考资料:

http://www.01happy.com/git-resolve-conflicts/

开发人员常常遇到这种情况:花了几天时间一直在做一个新功能,已经改了差不多十几个文件,突然有一个bug需要紧急解决,然后给一个build测试组。在Git问世之前基本上靠手动备份,费时且容易出错。

git stash命令简而言之就是帮助开发人员暂时搁置当前已做的改动,倒退到改动前的状态,进行其他的必要操作(比如发布,或者解决一个bug,或者branch,等等),之后还可以重新载入之前搁置的改动,很cool吧?

首先,用git add把所有的改动加到staging area。

git add .

接着用git stash把这些改动搁置。

git stash

到这里,当前工作平台就回复到改动之前了。该干嘛干嘛,此处省略1万字。

需要找回之前搁置的改动继续先前的工作了?

git stash apply 即可。

也可以用 git stash list 来查看所有的搁置版本(可能搁置了很多次,最好不要这样,容易搞混)

在出现一个搁置栈的情况下,比如如果你想找回栈中的第2个,可以用 git stash apply stash@{1}

如果想找回第1个,可以用 git stash pop

如果想删除一个stash,git stash drop <id>

删除所有stash,git stash clear