Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Incorporating Untracked Changes Into a File With the same name in a Git repository

I have made a number of changes to an HTML file and it’s associated CSS file outside of the Git environment. Now I want to safely update the files that are being tracked inside of the Git repository.

I am hoping to get some guidance for this aspect of Git before attempting anything.

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

>Solution :

If the files are already tracked and you have committed their current state, just replace them with the edited versions and then do an add-and-commit as usual.

Git doesn’t care how or where files got edited; it just sees that their content has changed. And a commit is simply a snapshot of the state of the whole project; again, how the project came to be in that state is no business or concern of Git’s.

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading