Last active
January 6, 2021 20:12
-
-
Save thiagobraga/d10feada3d42c95466d97560b3c94974 to your computer and use it in GitHub Desktop.
Revisions
-
thiagobraga revised this gist
Jan 6, 2021 . 1 changed file with 8 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,21 +1,27 @@ ## Ignorar alterações em arquivos com `update-index` ``` bash git update-index --assume-unchanged package.json git update-index --assume-unchanged resources/assets/sass/old_css/helper.css git update-index --assume-unchanged resources/views/errors/500.blade.php git update-index --assume-unchanged resources/views/layouts/admin/head.blade.php git update-index --assume-unchanged resources/views/layouts/admin/master.blade.php git update-index --assume-unchanged resources/views/layouts/student/head.blade.php git update-index --assume-unchanged resources/views/layouts/student/master.blade.php git update-index --assume-unchanged webpack.js.mix.js ``` ### Não ignorar alterações ``` bash git update-index --no-assume-unchanged package.json git update-index --no-assume-unchanged resources/assets/sass/old_css/helper.css git update-index --no-assume-unchanged resources/views/errors/500.blade.php git update-index --no-assume-unchanged resources/views/layouts/admin/head.blade.php git update-index --no-assume-unchanged resources/views/layouts/admin/master.blade.php git update-index --no-assume-unchanged resources/views/layouts/student/head.blade.php git update-index --no-assume-unchanged resources/views/layouts/student/master.blade.php git update-index --no-assume-unchanged webpack.js.mix.js ``` ## Incluir no `.git/info/exclude` -
thiagobraga revised this gist
Dec 9, 2020 . No changes.There are no files selected for viewing
-
thiagobraga revised this gist
Dec 9, 2020 . 1 changed file with 0 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,5 +1,3 @@ ## Ignorar alterações em arquivos com `update-index` ``` bash -
thiagobraga revised this gist
Dec 9, 2020 . 1 changed file with 36 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1 +1,36 @@ # [Git] Como ignorar arquivos localmente sem incluir no .gitignore ## Ignorar alterações em arquivos com `update-index` ``` bash git update-index --assume-unchanged resources/views/errors/500.blade.php git update-index --assume-unchanged resources/views/layouts/admin/master.blade.php git update-index --assume-unchanged resources/views/layouts/student/master.blade.php git update-index --assume-unchanged webpack.js.mix.js git update-index --assume-unchanged package.json ``` ### Não ignorar alterações ``` bash git update-index --no-assume-unchanged resources/views/errors/500.blade.php git update-index --no-assume-unchanged resources/views/layouts/admin/master.blade.php git update-index --no-assume-unchanged resources/views/layouts/student/master.blade.php git update-index --no-assume-unchanged webpack.js.mix.js git update-index --no-assume-unchanged package.json ``` ## Incluir no `.git/info/exclude` Este caso é para arquivos _untracked_ pelo git. Como não é possível utilizar o `update-index` para um arquivo que ainda não foi versionado, podemos usar o arquivo `exclude` do git. ```ini # git ls-files --others --exclude-from=.git/info/exclude # Lines that start with '#' are comments. # For a project mostly in C, the following would be a good set of # exclude patterns (uncomment them if you want to use them): # *.[oa] # *~ docker-compose.override.yml docker/php/xdebug.ini ``` -
thiagobraga created this gist
Dec 9, 2020 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1 @@