Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save gschema/2c60b5166fa36df586dd to your computer and use it in GitHub Desktop.

Select an option

Save gschema/2c60b5166fa36df586dd to your computer and use it in GitHub Desktop.

Revisions

  1. gschema revised this gist Nov 19, 2019. 1 changed file with 24 additions and 2 deletions.
    26 changes: 24 additions & 2 deletions Git - how to temporarily ignore and unignore file changes.md
    Original file line number Diff line number Diff line change
    @@ -16,11 +16,33 @@ git update-index --no-assume-unchanged <file>
    git ls-files -v | grep "^[[:lower:]]"
    ```

    ## alias check ignored files
    ## aliases

    __temp ignore file changes__
    ```
    git config --global alias.hide '!git update-index --assume-unchanged'
    # use it:
    git hide file/path.ext
    ```

    __unhide file(s)__
    ```
    git config --global alias.unhide '!git update-index --no-assume-unchanged'
    # use it:
    git unhide file/path.ext
    ```

    __unhide all__
    ```
    git config --global alias.unhideAll '!git update-index --really-refresh'
    # use it:
    git unhideAll
    ```

    __check ignored files__
    ```
    git config --global alias.hidden '!git ls-files -v | grep "^[[:lower:]]"'
    # use it:
    git hidden
    ```
    ```
  2. gschema revised this gist Nov 18, 2019. 1 changed file with 3 additions and 1 deletion.
    4 changes: 3 additions & 1 deletion Git - how to temporarily ignore and unignore file changes.md
    Original file line number Diff line number Diff line change
    @@ -16,9 +16,11 @@ git update-index --no-assume-unchanged <file>
    git ls-files -v | grep "^[[:lower:]]"
    ```

    __alias it:__
    ## alias check ignored files

    ```
    git config --global alias.hidden '!git ls-files -v | grep "^[[:lower:]]"'
    # use it:
    git hidden
    ```
  3. gschema revised this gist Nov 18, 2019. 1 changed file with 13 additions and 0 deletions.
    13 changes: 13 additions & 0 deletions Git - how to temporarily ignore and unignore file changes.md
    Original file line number Diff line number Diff line change
    @@ -8,4 +8,17 @@ git update-index --assume-unchanged <file>
    ## unignore:
    ```
    git update-index --no-assume-unchanged <file>
    ```

    ## check ignored files

    ```
    git ls-files -v | grep "^[[:lower:]]"
    ```

    __alias it:__
    ```
    git config --global alias.hidden '!git ls-files -v | grep "^[[:lower:]]"'
    # use it:
    git hidden
    ```
  4. gschema revised this gist Jul 22, 2015. 1 changed file with 1 addition and 1 deletion.
    Original file line number Diff line number Diff line change
    @@ -5,7 +5,7 @@
    git update-index --assume-unchanged <file>
    ```

    ## un-ignore:
    ## unignore:
    ```
    git update-index --no-assume-unchanged <file>
    ```
  5. gschema revised this gist Jul 22, 2015. 1 changed file with 1 addition and 1 deletion.
    Original file line number Diff line number Diff line change
    @@ -5,7 +5,7 @@
    git update-index --assume-unchanged <file>
    ```

    ## unignore
    ## un-ignore:
    ```
    git update-index --no-assume-unchanged <file>
    ```
  6. gschema renamed this gist Jul 22, 2015. 1 changed file with 0 additions and 0 deletions.
  7. gschema revised this gist Jul 22, 2015. 2 changed files with 11 additions and 5 deletions.
    5 changes: 0 additions & 5 deletions Git - how ignore and unignore file changes
    Original file line number Diff line number Diff line change
    @@ -1,5 +0,0 @@
    How to ignore/unignore file changes in Git?

    git update-index --assume-unchanged <file>

    git update-index --no-assume-unchanged <file>
    11 changes: 11 additions & 0 deletions Git - how to temporarily ignore and unignore file changes
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,11 @@
    # How to temporarily ignore/unignore file changes in Git?

    ## ignore:
    ```
    git update-index --assume-unchanged <file>
    ```

    ## unignore
    ```
    git update-index --no-assume-unchanged <file>
    ```
  8. gschema created this gist Jul 22, 2015.
    5 changes: 5 additions & 0 deletions Git - how ignore and unignore file changes
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,5 @@
    How to ignore/unignore file changes in Git?

    git update-index --assume-unchanged <file>

    git update-index --no-assume-unchanged <file>