Does anyone knows the root folder of git in react-native project?

Hey there everyone ! I’m finding the root folder of git in my react-native project … but can’t find … :((

Git folder is hidden by default.

I’ve try unhide the folders but it don’t even show the git folder ! how to visible the folder ?

@Jenovs ?? did you know how I can visible that folder ???

If the project has been initialised as a git repo, then there will be a folder called .git in the root (ie the folder that contains everything). If it hasn’t, there won’t be.

If you’ve accidentally run git init in a subfolder, then it will be there.

What happens when you run git init in the root folder? Does it throw an error?

Where is the root folder ? If you’re taking about the project’s main folder … there are two files(.git and .gitignore) … I have already deleted these too files

1 Like

Yes, “root” as in the “root” of the project, the place that contains everything. And .git is a folder, it contains everything git needs to track the files in the project. So if you’ve deleted that then the project isn’t tracked by git at all now, it’s not in any way connected to git.

.gitignore is a text file where you list files and folders you don’t want git to track. There are a fair few of those in a React Native project (ie everything that gets produced when you run build), so if you reinitialise the project as a git repo, then you’ll want to get that file put back.

1 Like

Okay okay thank you man :))

1 Like

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.