The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Why does Git ignore certain files and ALL directories, even with empty .gitignore?

Emilio Ferreira
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
April 14, 2022

I started Git in the root directory of the project, WITH GITIGNORE EMPTY, downloaded Wordpress and added it to the root of this project. The problem is that after using Git Status, the list to add tracking does not show hundreds of files and all Wordpress root directories.

 

What am I doing wrong? I wanted to start the project with all the Wordpress files and then push them to the repository. Only after that will I add files and directories to be ignored by Git.

 

tks

1 answer

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

0 votes
Theodora Boudale
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
April 20, 2022

Hi Emilio and welcome to the community.

It is possible that there is a global gitignore file on your machine, which includes patterns to be ignored for all repositories.

I would suggest running the command

git config --list

and check if the variable core.excludesFile is displayed in the output, and if so, what is its value. This configuration variable is used to set a global gitignore, and if set, you can check the patterns in that file.

I wanted to start the project with all the Wordpress files and then push them to the repository. Only after that will I add files and directories to be ignored by Git.

Please keep in mind that if you first commit e.g. *.jpg files in a repo, and then you add a .gitignore with *.jpg, the .jpg files that you already committed will not be ignored.

Kind regards,
Theodora

TAGS
AUG Leaders

Atlassian Community Events