How do I make to some of the files that I have changed is not offered in the commit?

后端 未结 4 908
野性不改
野性不改 2021-01-31 03:35

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 l

4条回答
  •  慢半拍i
    慢半拍i (楼主)
    2021-01-31 04:10

    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.


    Flag a file as "assume unchanged"

    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:

    • right-click the file and select the entry Assume Unchanged


    From any file list in Windows Explorer do the following:

    • right-click the file and select properties
    • go to the Git tab
    • tick the entry Assume valid/unchanged

    Remove the "assume unchanged" flag from a file (undo the above):

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

    • 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


    From any file list in Windows Explorer do the following:

    • right-click the file and select properties
    • go to the Git tab
    • untick the entry Assume valid/unchanged

提交回复
热议问题