Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

About the .gitignore question, .cxx folder in the Android project

Here's a question about Git, .gitignore on Android!

======================================================

Q1) What files are created in myproject/app/.cxx?

I am using ndk, jni in android project. It seems that the files related to this are being automatically changed in myproject/app/.cxx.

When I try to branch move, the files in this folder are changed, so I have a problem that I have to commit.

So I want to add that directory to .gitignore, I don't know exactly what that directory is, so I'm wondering if I can add it to .gitignore

======================================================

Q2) I have multiple .gitignore files.

If I add that directory (myproject/app/.cxx) to .gitignore,

There is also a .gitignore file in the "myproject" folder,

There is also a .gitignore file in the "myproject/app" folder.

Should i edit .gitignore in "myproject/app"??

like image 787
unemployer Avatar asked Jan 24 '26 01:01

unemployer


1 Answers

As to answer your second question, You need to have only one .gitignore file at the root of the project folder.

As to answer your first question, all the .cxx files must be ignored. You can have the below line in .gitignore file.

**/.cxx

If you have already tracked this file, use the below commands after adding the above line in .gitignore file

git rm --cached . // (Don't forget the dot at the end)

git add .

git commit -m "Commit-message" 
like image 182
Sohail Avatar answered Jan 26 '26 15:01

Sohail



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!