git隐藏修改_您可能不知道的有关Git隐藏的有用技巧
git隐藏修改
I have launched a newsletter Git Better to help learn new tricks and advanced topics of Git. If you are interested in getting your game better in Git, you should definitely check that out.
我已经发布了Git Better通讯,以帮助学习Git的新技巧和高级主题。 如果您有兴趣在Git中改进游戏,请务必进行确认。
If you have been using Git for a while you might have used Git stash. It’s one of the useful features in Git.
如果您已经使用Git一段时间,则可能已经使用过Git隐藏。 这是Git中有用的功能之一。
Here are some of the useful tricks I learned about Git stash last week.
这是我上周了解到有关Git隐藏的一些有用技巧。
- Git stash saveGit隐藏保存
- Git stash listGit存储列表
- Git stash applyGit隐藏
- Git stash popGit藏起来流行
- Git stash showGit隐藏节目
- Git stash branch <name>Git隐藏分支<名称>
- Git stash clearGit隐藏
- Git stash dropGit藏匿下落
Git隐藏保存 (Git stash save)
This command is like Git stash. But this command comes with various options. I will discuss some important options in this post.
这个命令就像Git隐藏。 但是此命令带有各种选项。 我将在这篇文章中讨论一些重要的选择。
Git stash with message
Git隐藏消息
git stash save “Your stash message”.
The above command stashes with a message. We will see how this is helpful in a bit.
上面的命令隐藏了一条消息。 我们将在稍后看到这有什么帮助。
Stashing untracked files
隐藏未跟踪的文件
You can also stash untracked files.
您也可以隐藏未跟踪的文件。
git stash save -uorgit stash save --include-untracked
Git存储列表 (Git stash list)
Before discussing this command, let me tell you something about how stash works.
在讨论此命令之前,让我告诉您一些有关存储如何工作的信息。
When you Git stash or Git stash save, Git will actually create a Git commit object with some name and then save it in your repo.
当您保存Git或保存Git时,Git实际上会创建一个具有某些名称的Git提交对象,然后将其保存在您的存储库中。
So it means that you can view the list of stashes you made at any time.
因此,这意味着您可以随时查看自己制作的存储清单。
git stash list
See the example below:
请参阅以下示例:
You can see the list of stashes made. And the most recent stash made is in the top.
您可以看到存储的列表。 并且最新的存储在顶部。
And you can see that the top stash is given a custom message (using Git stash save “message” ).
您会看到顶部存储区收到了自定义消息(使用Git存储区保存“消息”)。
Git隐藏 (Git stash apply)
This command takes the top most stash in the stack and applies it to the repo. In our case it is stash@{0}
此命令将堆栈中最高级的存储区保存到仓库中。 在我们的例子中是stash @ {0}
If you want to apply some other stash you can specify the stash id.
如果要应用其他存储,则可以指定存储ID。
Here’s the example:
这是示例:
git stash apply stash@{1}
Git藏起来流行 (Git stash pop)
This command is very similar to stash apply but it deletes the stash from the stack after it is applied.
此命令与stash apply非常相似,但是它在应用后将其从堆栈中删除。
Here’s the example:
这是示例:
As you can see the top stash is deleted and stash@{0} is updated with older stash.
如您所见,顶部的存储已删除,并且存储@ {0}已更新为较旧的存储。
Likewise, if you want a particular stash to pop you can specify the stash id.
同样,如果要弹出特定的存储,则可以指定存储ID。
git stash pop stash@{1}
Git隐藏节目 (Git stash show)
This command shows the summary of the stash diffs. The above command considers only the latest stash.
此命令显示隐藏差异的摘要。 上面的命令仅考虑最新的存储。
Here’s the example:
这是示例:
If you want to see the full diff, you can use
如果要查看完整的差异,可以使用
git stash show -p
Likewise with other commands, you can also specify the stash id to get the diff summary.
与其他命令一样,您也可以指定存储ID以获取差异摘要。
git stash show stash@{1}
Git藏匿处<na me> (Git stash branch <name>)
This command creates a new branch with the latest stash, and then deletes the latest stash ( like stash pop).
此命令创建一个具有最新存储的新分支,然后删除最新存储(如存储弹出)。
If you need a particular stash you can specify the stash id.
如果需要特定的存储,则可以指定存储ID。
git stash branch <name> stash@{1}
This will be useful when you run into conflicts after you’ve applied the stash to the latest version of your branch.
在将隐藏应用到分支的最新版本后遇到冲突时,这将非常有用。
Git隐藏 (Git stash clear)
This command deletes all the stashes made in the repo. It maybe impossible to revert.
该命令删除存储库中的所有存储。 可能无法还原。
Git藏匿下落 (Git stash drop)
This command deletes the latest stash from the stack. But use it with caution, it maybe be difficult to revert.
此命令从堆栈中删除最新的存储。 但是谨慎使用它,可能很难恢复。
You can also specify the stash id.
您还可以指定隐藏ID。
git stash drop stash@{1}
Hope you got some useful tricks about Git stash.
希望您对Git隐藏有了一些有用的技巧。
If you have come this far, then I think you are pretty much interest in Git. Check out my newsletter Git Better to learn new tricks and advanced topics of Git. :)
如果您走了这么远,那么我认为您对Git很有兴趣。 查看我的Git通讯,了解Git的新技巧和高级话题。 :)
If you enjoyed the article try to give some claps and share it :) :)
如果您喜欢这篇文章,请尝试鼓掌并分享它:) :)
翻译自: https://www.freecodecamp.org/news/useful-tricks-you-might-not-know-about-git-stash-e8a9490f0a1a/
git隐藏修改
相关文章:

css 层叠式样式表(2)
一,样式表分类 (1)内联样式。 --优先级最高,代码重复使用最差。 (当特殊的样式需要应用到单独某个元素时,可以使用。 直接在相关的标签中使用样式属性。样式属性可以包含任何 CSS 属性。) &…

Hadoop学习笔记之三 数据流向
http://hadoop.apache.org/docs/r1.2.1/api/index.html 最基本的: 1. 文本文件的解析 2. 序列文件的解析 toString会将Byte数组中的内存数据 按照字节间隔以字符的形式显示出来。 文本文件多事利用已有的字符处理类, 序列文件多事创建byte数组࿰…

[微信小程序]星级评分和展示(详细注释附效果图)
微信小程序开发交流qq群 173683895 承接微信小程序开发。扫码加微信。 正文: 星级评分分成两种情况: 一:展示后台给的评分数据 二:用户点击第几颗星星就显示为几星评分; <!--pages/test/test.wxml--> <view> <view>一:显示后台给的评分</…

uber_这就是我本可以免费骑Uber的方式
uberby AppSecure通过AppSecure 这就是我本可以免费骑Uber的方式 (Here’s how I could’ve ridden for free with Uber) 摘要 (Summary) This post is about a critical bug on Uber which could have been used by hackers to get unlimited free Uber rides anywhere in th…

磁盘I/O 监控 iostat
iostat -cdxm 2 5 dm-4 如果没有这个命令,需要安装sysstat 包。 Usage: iostat [ options ] [ <interval> [ <count> ] ]Options are:[ -c ] [ -d ] [ -N ] [ -n ] [ -h ] [ -k | -m ] [ -t ] [ -V ] [ -x ] [ -z ][ <device> [...] | ALL ] [ -p…

[微信小程序]物流信息样式加动画效果(源代码附效果图)
微信小程序开发交流qq群 173683895 承接微信小程序开发。扫码加微信。 正文: 效果图片:(信息仅为示例) <!--pages/order/order_wl.wxml--> <view classpage_row top><image classgoods src../../images/dsh.png></image><view cl…

在 Ubuntu 14.04 Chrome中安装Flash Player(转)
在 Ubuntu 14.04 中安装 Pepper Flash Player For Chromium 一个 Pepper Flash Player For Chromium 的安装器已经被 Ubuntu14.04 的官方源收录。Flash Player For Linux 自11.2 起已经停止更新,目前 Linux 平台下面的 Flash Player 只能依靠 Google Chrom 的 PPAPI…

数据结构显示树的所有结点_您需要了解的有关树数据结构的所有信息
数据结构显示树的所有结点When you first learn to code, it’s common to learn arrays as the “main data structure.”第一次学习编码时,通常将数组学习为“主要数据结构”。 Eventually, you will learn about hash tables too. If you are pursuing a Comput…

Unity应用架构设计(9)——构建统一的 Repository
谈到 『Repository』 仓储模式,第一映像就是封装了对数据的访问和持久化。Repository 模式的理念核心是定义了一个规范,即接口『Interface』,在这个规范里面定义了访问以及持久化数据的行为。开发者只要对接口进行特定的实现就可以满足对不同…

PHP连接数据库并创建一个表
微信小程序开发交流qq群 173683895 承接微信小程序开发。扫码加微信。 <html> <body><form action"test.class.php" method"post"> title: <input type"text" name"title"><br> centent: <input t…

MyBatis 入门
什么是 MyBatis ? MyBatis 是支持定制化 SQL、存储过程以及高级映射的优秀的持久层框架。MyBatis 避免了几乎所有的 JDBC 代码和手工设置参数以及抽取结果集。MyBatis 使用简单的 XML 或注解来配置和映射基本体,将接口和 Java 的 POJOs(Plain Old Java O…

cms基于nodejs_我如何使基于CMS的网站脱机工作
cms基于nodejsInterested in learning JavaScript? Get my ebook at jshandbook.com有兴趣学习JavaScript吗? 在jshandbook.com上获取我的电子书 This case study explains how I added the capability of working offline to the writesoftware.org website (whic…

how-to-cartoon-ify-an-image-programmatically
http://stackoverflow.com/questions/1357403/how-to-cartoon-ify-an-image-programmatically 转载于:https://www.cnblogs.com/guochen/p/6655333.html

Android Studio 快捷键
2015.02.05补充代码重构快捷键 Alt回车 导入包 自动修正CtrlN 查找类CtrlShiftN 查找文件CtrlAltL 格式化代码CtrlAltO 优化导入的类和包AltInsert 生成代码(如get,set方法,构造函数等)CtrlE或者AltShiftC 最近更改的代码CtrlR 替换文本CtrlF 查找文本CtrlShiftSpace 自动补全…

【微信小程序】异步请求,权重,自适应宽度并折行,颜色渐变,绝对定位
微信小程序开发交流qq群 173683895 承接微信小程序开发。扫码加微信。 正文: 写这篇博文主要是为了能够给到大家做类似功能一些启迪,下面效果图中就是代码实现的效果,其中用到的技巧点还是比较多的, <!--pages/demo_list/d…

服务器部署基础知识_我在生产部署期间学到的知识
服务器部署基础知识by Shruti Tanwar通过Shruti Tanwar 我在生产部署期间学到的知识 (What I learned during production deployment) Production deployment. The final stage of every project. When all the hard work you’ve put in over the course of time goes live t…

STM32 KEIL中 负数绝对值处理
使用数码管显示负温度时需要把负数转换为绝对值 #include<math.h> 使用abs 或者自己写函数 #define ABS(x) ((x)>0?(x):-(x)))转载于:https://www.cnblogs.com/yekongdexingxing/p/6657371.html

js数组按照下标对象的属性排序
微信小程序开发交流qq群 173683895 承接微信小程序开发。扫码加微信。 根据数组中某个参数的值的大小进行升序 <script type"text/javascript">function compare(val) {return function (a, b) {var value1 a[val];var value2 b[val];return value1…

window 下相关命令
1. 启动window服务(各种应用启动设置的地方)命令方式: 1). window 按钮(输入CMD的地方)处输入:services.msc ,然后执行。 // 输入命令正确,上面的待选框中会出现要执行的命令。msc 可以理解为Microsoft client 2). 计算机 -- …

javascript语法糖_语法糖和JavaScript糖尿病
javascript语法糖by Ryan Yurkanin瑞安尤卡宁(Ryan Yurkanin) 语法糖和JavaScript糖尿病 (Syntactic Sugar and JavaScript Diabetes) Syntactic sugar is shorthand for communicating a larger thought in a programming language.语法糖是用编程语言传达更大思想的简写。 …

《DSP using MATLAB》示例Example7.23
代码: wp 0.2*pi; ws 0.3*pi; Rp 0.25; As 50; [delta1, delta2] db2delta(Rp, As);[N, f, m, weights] firpmord([wp, ws]/pi, [1, 0], [delta1, delta2]);N f m weightsh firpm(N, f, m, weights); [db, mag, pha, grd, w] freqz_m(h, [1]);delta_w 2*pi…

css画图笔记
微信小程序开发交流qq群 173683895 承接微信小程序开发。扫码加微信。 正文: 在网页中,经常会用到各种Icon,如果老是麻烦设计狮画出来不免有些不好意思,所以有时候我们也可以用CSS写出各种简单的形状,一来可以减轻…

Web前端开发最佳实践(8):还没有给CSS样式排序?其实你可以更专业一些
前言 CSS样式排序是指按照一定的规则排列CSS样式属性的定义,排序并不会影响CSS样式的功能和性能,只是让代码看起来更加整洁。CSS代码的逻辑性并不强,一般的开发者写CSS样式也很随意,所以如果不借助工具,不太容易按照既…

超越Android:Kotlin在后端的工作方式
by Adam Arold亚当阿罗德(Adam Arold) 超越Android:Kotlin在后端的工作方式 (Going Beyond Android: how Kotlin works on the Backend) This article is part of a series.本文是系列文章的一部分。 While most developers use Kotlin on Android, it is also a …

词汇的理解 —— 汉译英(术语)
词汇的理解 —— 英译汉 1. 名词 机制:mechanism,系统:system;2. 动词 融资:financing;制动:braking,就是“刹车”;3. 音乐与乐器 horn:喇叭,号角…

Swift从零开始学习_08(代理协议传值)
Swift中的代理协议的写法. 这是第一个页面有一个button和一个label, button点击跳到下一个页面. 第二个页面有一个输入框和一个按钮, 点击按钮把输入框里的内容设置为第一个页面label的内容.效果如下 接下来是代码部分.跟OC的写法还是一样的.这里不再写第一个页面的那些UI的…

[微信小程序]商城之购买商品数量实现
微信小程序开发交流qq群 173683895 承接微信小程序开发。扫码加微信。 正文: 这里有三种变更数量的方式, 加号,减号,input输入 , 这里做了限制,数量不能小于等于0并且不能超过现有库存,下面是…

测试nginx网站代码_在40行以下代码中使用NGINX进行A / B测试
测试nginx网站代码by Nitish Phanse由Nitish Phanse 在40行以下代码中使用NGINX进行A / B测试 (A/B testing with NGINX in under 40 lines of code) A/B Testing, has enabled designers and product managers to get a deep insight into user behavioral patterns.A / B测试…

HttpServletResponse,HttpServletRequest详解
HttpServletResponse,HttpServletRequest详解 1、相关的接口 HttpServletRequest HttpServletRequest接口最常用的方法就是获得请求中的参数,这些参数一般是客户端表单中的数据。同时,HttpServletRequest接口可以获取由客户端传送的名称,也可…

[微信小程序]this.setData , that.setData , this.data.val三者之间的区别和作用
微信小程序开发交流qq群 173683895 承接微信小程序开发。扫码加微信。 正文: 1.this.setData({ }) <view bindtouchmove"tap_drag" bindtouchend"tap_end" bindtouchstart"tap_start" class"page-top" style"{…