Do not commit Specific line in GIT

2

Hello,

Is it possible in Git to ignore a specific line within a file? It would be interesting for cases where we need to register a password, in this case I need to commit the file, but I would like to ignore the line that contains the password.

    
asked by anonymous 06.05.2016 / 18:08

1 answer

1

When adding the specific file in staging , add it with:

git add -p <arquivo>

This way you can select the contiguous spaces of modifications in the file.

    
09.05.2016 / 13:30