问题标签 [revision-history]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
1 回答
121 浏览

git - Git - 从提交历史中删除种子仓库的历史

我的 github pages repo 基于https://github.com/maciakl/Sample-Jekyll-Site。为了实现这一点,我克隆了https://github.com/maciakl/Sample-Jekyll-Site然后手动更改了 git config 中的来源。但是现在我的仓库在其历史中包含了所有https://github.com/maciakl/Sample-Jekyll-Site的提交。有没有办法摆脱它们?

0 投票
2 回答
7702 浏览

git - git filter-branch --msg-filter 改写推送的提交消息

如何改写已经推送到私人远程的旧提交的消息?我想保留时间戳和标签。

我在这里找到了这个命令:

为了保留我添加的标签:--tag-name-filter cat

执行命令时 git 告诉我:msg filter failed

我要更改的消息是合并消息“合并分支'release / ...'”这是问题吗?

0 投票
2 回答
806 浏览

git - 推送非快进提交时,git 如何丢失历史记录?

我知道有时当我运行时git push,我会收到此错误:

有人可以举例说明如果我推送非快进更新会丢失历史记录的情况吗?据我了解,当我这样做时git push,git 只会将我的提交推送到远程存储库而不删除任何现有的提交,那么它将如何丢失历史记录?

谢谢!

0 投票
4 回答
1294 浏览

git - Git 问题 - 内存不足,malloc 失败。需要使用 filter-branch 或类似的方式修改 repo

我在树莓派上使用私人托管的 git 存储库来存储我所有的学校作业。我这样做是为了帮助我熟悉 Git,并在一般情况下运行 linux 服务器。一切正常,直到昨晚我收到一条错误消息,内容如下:

我假设这里的实际问题是服务器只是内存不足。我检查了我的 repo 的大小,它超过了 300mb。这是因为作为一个新用户,我没有意识到上传诸如 Visual Studio、Eclipse 和 Netbeans 临时用户文件之类的东西是一件坏事。我知道如何为当前和未来的提交删除这些文件 - 但我一直很难尝试从存储库中完全删除这些文件。谷歌帮助我挖掘的所有过滤器分支方法似乎只适用于几个文件。我需要批量删除许多文件,并且当它在给定目录中找不到单个文件时,我需要它不要抱怨我。

所以我的问题是,有没有一种合理的方法来做我所要求的?或者在我的情况下,只是丢失我的提交消息历史记录,并从第一天开始安全地启动所有 .gitignore 文件的新存储库会更容易吗?

0 投票
3 回答
1214 浏览

git - 如何跨合并提交移动提交?

假设我有一个这样的存储库:

M合并topicmaster. _

后来我在 中发现了一个错误,所以我在分支上C提交了一个修复它的问题,位于:masterM

但理想情况下,我希望历史看起来像这样:

如何重写历史记录,以便C1在合并之前出现M

我可以删除M,应用由 制作的补丁C1,然后再次合并topicmaster再次解决所有冲突,但我想避免这种努力,我更愿意保留原始提交信息(作者、日期等)如果可能的话,这排除了git commit再次做的可能性。我希望它是可能的git rebase,但我失败了,其中一个或两个-p-i

0 投票
1 回答
91 浏览

git - How do you manage versions?

I am a self-trained programmer (analytical chemist by training, now more akin to a bioinformatician and computational biologist). My code alternates between one-off work that may not be used more than a handful of times, to code that is constantly building on top of itself or other modules I have written. I am the only one working on this code, but I work on it from many locations. For this reason, I use dropbox to keep all of my projects synced. Problem is that currently when I make major changes to a file, I either make notes within the file and comment out the old section or simply add a counter to the file name (v1, v2, etc). This gets messy both within my code and within my directory.

I realized this is not the most effective way to keep track of versions, but when it is just me, it is very quick for me to move between files, debugging or improving, and in the event I need to go back a version, either the 'previous versions' within Windows works, or Dropbox keeps versions. This is opposed to having to commit, pull, branch, etc. with something like Git-hub.

Can anyone recommend a better workflow, again, for a single person to keep track of code? Instead of keeping all the v1, v2, etc, it would be nice to have a record of them somewhere, easy comparisons to see changes, and the ability to use them if needed.

0 投票
1 回答
2540 浏览

java - 如何在 Eclipse 中查看更长的代码修订历史

要查看历史代码修订/删除/更改(等),我们右键单击 Package Exlorer 中的 .java 文件,然后转到Replace With -> Local History。这显示了过去两天的修订。如何获得更完整的修订历史记录?

注意我知道SVN。

0 投票
4 回答
8626 浏览

intellij-idea - IntelliJ IDEA 将本地历史文件保存在哪里?

我的公司有一项关于在本地开发人员机器上保持源代码加密的政策。IntelliJ IDEA 将用于驱动其本地历史功能的代码更改副本保存在哪里?

0 投票
1 回答
377 浏览

svn - 使用 TortoiseSVN 查找对单行的所有更改

我可以使用 Log 来查找单个文件的完整历史记录,并且可以使用 Blame 来查找谁最后更改了一行。

有没有办法使用 TortoisSVN 或其控制台对应物获取单行的完整历史记录?


原因:我需要找出文件中有很多更改的某行何时损坏,而最后的更改不是损坏它的原因...

0 投票
1 回答
537 浏览

java - 使用 JAVA API 的 Rally Project 修订历史

我想获得项目的修订历史。我想找到包含修订描述为“ PARENT changed from ”及其LastUpdateddate的项目。我尝试了以下代码,它引发了 Null Pointer 异常。我在这段代码中使用的查询是否正确?请帮忙。

谢谢

斯里