Last active
March 27, 2022 01:16
-
-
Save claudiu-marginean/6af0b44da386ddb9266a to your computer and use it in GitHub Desktop.
GIT - Assume Unchanged
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 characters
Aveti aici niste comenzi foarte utile pentru situatiile in care vreti sa evitati sa faceti in mod repetat stash-uri la o serie de fisiere de configurari locale, pe care nu trebuie nici sa le comiteti pe un proiect, si nici sa le puneti in gitignore pentru ca fisierele exista si sunt necesare pe branchurile superioare. | |
In aceste cazuri puteti folosi: | |
### Pentru a opri tracking-ul fisierului | |
```git update-index --assume-unchanged <file>``` | |
On Windows use: | |
```git ls-files -v | grep "^[a-z]"``` | |
### Pentru a incepe din nou tracking-ul fisierului: | |
```git update-index --no-assume-unchanged <file>``` | |
### Iar pentru a vedea lista fisierelor pe care s-a oprit tracking-ul: | |
```git ls-files -v | grep ^[a-z]``` | |
Credits goes to Dan Ignat :D |
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 characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment