mikaku / Fiwix

A UNIX-like kernel for the i386 architecture
https://www.fiwix.org
Other
407 stars 32 forks source link

Create a .gitignore? #30

Closed mamccollum closed 1 year ago

mamccollum commented 1 year ago

Hey there, I built Fiwix but I noticed that Git was tracking files that shouldn't be getting into the source tree, such as object files. Could you look into creating a .gitignore file to ensure in the future nothing unwanted gets into the source tree? I ran make clean and it seems to only delete *.o files, fiwix and System.map.gz. You could add these files to a gitignore, newline-delimited.

ex.

*.o
fiwix
System.map.gz
mikaku commented 1 year ago

Sure, but now I have a non-tracked file called .gitignore :smiley:

Should I also add this one to the list or there is a special configuration option to avoid this?

mikaku commented 1 year ago

Also, now git shows the following message when I add a file into stage before the commit:

The following paths are ignored by one of your .gitignore files:
include/fiwix
hint: Use -f if you really want to add them.
hint: Turn this message off by running
hint: "git config advice.addIgnoredFile false"

I'm just adding a file that is not related to the list in .gitignore. I'm a bit confused.

rick-masters commented 1 year ago

Once you add and commit .gitignore it will no longer be non-tracked. You don't want .gitignore in .gitignore because you want to track changes to it.

For the second issue, the patterns apply to any directory, so it is related. You can use a specific path to avoid picking up include/fiwix:

*.o
/fiwix
System.map.gz
mikaku commented 1 year ago

@rick-masters.

Yes, this clears it up. Excuse my ignorance. Thank you!