history

How to undelete a file previously deleted in git's history?

时光毁灭记忆、已成空白 提交于 2019-12-17 17:46:06
问题 Using Chris's answer on another question I could prepend a snapshot-history to my git repository. Since one of the files is not part of my history but only in the snapshots, the first original commit now also contains the deletion of this file. How can I undo that? At first I thought this was the opposite of How do I remove sensitive files from git’s history, but actually I don't want to insert a file into history but just remove the deletion from history. 回答1: git checkout <commit> <filename

Export subtree in Git with history

别来无恙 提交于 2019-12-17 17:25:57
问题 I have a folder in my Git repository that I'd like to move out in to its own repository. Is it possible to move the history of that folder along with the folder? I've previously been doing just a git rm -r --cached subfolder/ and then git init on the subfolder. However, the history is not imported in to the new repository. 回答1: Quoting an example from git-filter-branch(1) To rewrite the repository to look as if foodir/ has been its project root, and discard all other history: git filter

Is there a way to change a SVN users username through the entire repository history?

时光怂恿深爱的人放手 提交于 2019-12-17 10:33:10
问题 When my team first started out with SVN we all just used our first names when committing to the repository, however, now that our team has grown, we are running into issues because we just hired a second Mike . What we would like to do is change everybody's usernames to be the same as the username on their computer (first name initial + last name). The issue that I'm seeing is that the SVN history will still show the old usernames on commits. Is there a tool out there for changing usernames

Is there a way to change a SVN users username through the entire repository history?

非 Y 不嫁゛ 提交于 2019-12-17 10:32:51
问题 When my team first started out with SVN we all just used our first names when committing to the repository, however, now that our team has grown, we are running into issues because we just hired a second Mike . What we would like to do is change everybody's usernames to be the same as the username on their computer (first name initial + last name). The issue that I'm seeing is that the SVN history will still show the old usernames on commits. Is there a tool out there for changing usernames

Using git to identify all modified functions in a revision

可紊 提交于 2019-12-17 09:55:51
问题 Is there a good way to use git to identify all the modified functions in each revision in the history? I've tried using the -p switch, but it doesn't seem to work in the same way that svn's show-c-function parameter works. My assumption is that I'll want to use "git diff HEAD~i HEAD~i-1 -p" for increasing values of i. Am I missing some parameters that will help identify diff's best guess on the functions that were modified? 回答1: Here's a quick and dirty attempt at what I think you're going

MySQL分页查询性能优化

徘徊边缘 提交于 2019-12-17 04:22:28
当需要从数据库查询的表有上万条记录的时候,一次性查询所有结果会变得很慢,特别是随着数据量的增加特别明显,这时需要使用分页查询。对于数据库分页查询,也有很多种方法和优化的点。下面简单说一下我知道的一些方法。 准备工作 为了对下面列举的一些优化进行测试,下面针对已有的一张表进行说明。 表名:order_history 描述:某个业务的订单历史表 主要字段:unsigned int id,tinyint(4) int type 字段情况:该表一共37个字段,不包含text等大型数组,最大为varchar(500),id字段为索引,且为递增。 数据量:5709294 MySQL版本:5.7.16 线下找一张百万级的测试表可不容易,如果需要自己测试的话,可以写shell脚本什么的插入数据进行测试。 以下的 sql 所有语句执行的环境没有发生改变,下面是基本测试结果: select count(*) from orders_history; 返回结果:5709294 三次查询时间分别为: 8903 ms 8323 ms 8401 ms 一般分页查询 一般的分页查询使用简单的 limit 子句就可以实现。limit 子句声明如下: SELECT * FROM table LIMIT [offset,] rows | rows OFFSET offset LIMIT 子句可以被用于指定

Why are “control” characters illegal in XML 1.0?

…衆ロ難τιáo~ 提交于 2019-12-17 02:44:11
问题 There are a variety of characters that are not legally encodeable in XML 1.0, e.g. U+0007 ('bell') and U+001B ('escape'). Most of the interesting ones are non-whitespace 'control' characters. It's clear from (e.g.) this question and others that it's the XML spec that's the issue -- but can anyone illuminate me as to why the XML spec forbids these characters? It seems like it could have been required that they be encoded in escapes, e.g. as &#x0007; and &#x001B; respectively, but perhaps there

React-router使用

做~自己de王妃 提交于 2019-12-16 13:33:03
介绍 react-router 被分为以下几部分: react-router是浏览器和原生应用中的通用部分。 react-router-dom是用于浏览器的。 react-router-native是用于原生应用的。 react-router 是核心部分。 react-router-dom 提供了浏览器使用需要的定制组件。 react-router-native 则专门提供了在原生移动应用中需要用到的部分。 安装 开发web引用只需要安装 react-router-dom 。 npm install react-router-dom --save 三个props history History是React Router的两大重要依赖之一,在不同的JavaScript环境中, history 以多种形式实现了对于session历史的管理。 history 对象通常会具有以下属性和方法: length - number类型,表示history堆栈的数量。 action - string类型,表示当前的动作。比如 pop 、 replace 或 push 。 location - object类型,表示当前的位置。 push(path, [state]) - function类型,在history堆栈顶加入一个新的条目。 replace(path, [state]) -

MySQL分页查询优化

跟風遠走 提交于 2019-12-16 10:55:57
当需要从数据库查询的表有上万条记录的时候,一次性查询所有结果会变得很慢,特别是随着数据量的增加特别明显,这时需要使用分页查询。对于数据库分页查询,也有很多种方法和优化的点。下面简单说一下我知道的一些方法。 准备工作 为了对下面列举的一些优化进行测试,下面针对已有的一张表进行说明。 表名:order_history 描述:某个业务的订单历史表 主要字段:unsigned int id,tinyint(4) int type 字段情况:该表一共37个字段,不包含text等大型数据,最大为varchar(500),id字段为索引,且为递增。 数据量:5709294 MySQL版本:5.7.16 线下找一张百万级的测试表可不容易,如果需要自己测试的话,可以写shell脚本什么的插入数据进行测试。 以下的 sql 所有语句执行的环境没有发生改变,下面是基本测试结果: select count(*) from orders_history; SQL 返回结果:5709294 三次查询时间分别为: 8903 ms 8323 ms 8401 ms 一般分页查询 一般的分页查询使用简单的 limit 子句就可以实现。limit 子句声明如下: SELECT * FROM table LIMIT [ offset , ] rows | rows OFFSET offset SQL LIMIT

React-Router browserHistory浏览器刷新出现页面404解决方案

让人想犯罪 __ 提交于 2019-12-15 20:58:23
在React项目中我们经常需要采用React-Router来配置我们的页面路由,React-Router 是建立在 history 之上的,常见的history路由方案有三种形式,分别是:   1.hashHistory   2.browserHistory   3.createMemoryHistory 如果使用 hashHistory ,访问的页面url如 example.com/#/some/path 的路由。 于是采用第二种browserHistory,但是部署到自己的服务器之后,可以正常访问,但是强制刷新页面之后报404找不到页面路径 Nginx配置方式如下 server { server_name react.thinktxt.com; listen 80; root /Users/txBoy/WEB-Project/React-Demo/dist; index index.html; location / { try_files $uri /index.html; } } 访问后刷新,解决404问题 来源: https://www.cnblogs.com/zjknb/p/12045835.html