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

What is the purpose of saved* command in a .gitignore file?

Following the .gitignore file in one of my research project built in python I have noticed the saved* command but I couldn’t relate the purpose of it from that project directory.

Here’re the commands in the .gitignore file:

*.pyc

.ipynb_checkpoints

saved*

Now, I could make out the first two commands but why is actually the saved* command used for in a certain .gitignore file?

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

Is it for blocking any newly created directories and treating them as unversioned files in the project folder ??

>Solution :

If you have any directories OR files that have names starting with ‘saved’ then they would be blocked from getting versioned/included in the git repo. The ‘*’ is a wildcard, so it is looking for the string ‘saved’ with or without any characters in the name after that, and ignoring those files/paths from getting included when you run git commands.

There doesn’t necessarily have to be a file or directory named that….but as wkl indicated in the comments, someone likely created a path like that to copy files to but didn’t want them to get committed to the repository, so they added that to the .gitignore file.

See: https://docs.github.com/en/get-started/getting-started-with-git/ignoring-files for more info on how to use .gitignore.

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