我如何更改提交中未提供的某些我已更改的文件

我如何更改提交中未提供的某些我已更改的文件

本文介绍了我如何更改提交中未提供的某些我已更改的文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用 TortoiseGit 1.8.3.我更改了其中一个文件:Makefile,但我不想在 Git Commit 中每次都提交给我.我将它添加到删除并添加到忽略列表"中,但它没有帮助.提交中未提供我更改的某些文件如何处理?

I use TortoiseGit 1.8.3.I changed one of the files: Makefile, but I want to not offer commit it to me every once in a Git Commit.I added it to the "delete and add to ignore list", but it does not help.How do I make to some of the files that I have changed is not offered in the commit?

我希望 Makefile 在远程存储库中是只读的,我可以在本地编辑它,然后 TortoiseGit 不提供给我提交.

I want, that Makefile was in remote repository as read-only, that I could edit it locally, and then TortoiseGit does not offer to me to commit it.

我想要的 Git-bash:https://www.kernel.org/pub/software/scm/git/docs/git-update-index.html

That I wanted for Git-bash: https://www.kernel.org/pub/software/scm/git/docs/git-update-index.html

推荐答案

TortoiseGit 1.8.15、Git 2.6.1 的答案.无需恢复到命令行,所有功能都可以在 TortoiseGit 中直接使用.我试图总结如何访问此功能的各种方式.我假设读者知道假设不变"是什么意思.这里有关于此功能的简单文档.或者关于 --assume-unchanged 或 git .

Answer for TortoiseGit 1.8.15, Git 2.6.1. There is no need to revert to the command line, all functions are directly available in TortoiseGit. I've tried to summarize the various ways how this function is accessible.I assume that the reader knows what "assume unchanged" means. Here is easy documentation about this feature. Or the original documentation about --assume-unchanged or git ls-files.

TortoiseGit 中有三种可能性:在 Commit 对话框中,Working Tree 对话框(检查修改)或在 Log Messages 对话框中(仅当 Working dir changes 条目被选中时).从这些对话框之一执行以下操作:

There are three possibilities in TortoiseGit: in the Commit dialog, the Working Tree dialog (Check for Modifications) or in the Log Messages dialog (only when Working dir changes entry is selected). From one of these dialogs do the following:

  • 右键单击该文件并选择条目假设未更改


Windows 资源管理器中的任何文件列表执行以下操作:


From any file list in Windows Explorer do the following:

  • 右键单击文件并选择属性
  • 转到 Git 标签
  • 勾选条目假设有效/未更改

TortoiseGit 仅允许从 工作树 对话框中删除标记(检查修改).

TortoiseGit allows to remove the flag only from the Working Tree dialog (check for Modifications).

  • 在对话框的左下角:确保勾选选项显示忽略本地更改标记的文件
  • 具有假定有效skip worktree标志的所有文件将显示在正常更改的文件下方
  • 右键单击该文件并选择取消标记为跳过工作树或假设未更改
  • in the lower left corner of the dialog: make sure to tick the option Show ignore local changeds flagged files
  • all files with assumed valid or skip worktree flag will be shown below the normal changed files
  • right-click on the file and select Unflag as skip-worktree or assume-unchanged


Windows 资源管理器中的任何文件列表执行以下操作:


From any file list in Windows Explorer do the following:

  • 右键单击文件并选择属性
  • 转到 Git 标签
  • 取消勾选条目假设有效/未更改

这篇关于我如何更改提交中未提供的某些我已更改的文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-05 23:21