1

I am using an iMac of 2011 and Visual Studio Code (same issue in PyCharm).

I pushed an Django and React project to GitHub. The Django project is pushed like expected. The React part of the project is really strange. The folder is not clickable. GitHub repo picture

I checked in VSC in terminal git status:

On branch master
Changes not staged for commit:
(use “git add < file>…” to update what will be committed)
(use “git restore < file>…” to discard changes in working directory)
(commit or discard the untracked or modified content in submodules)
modified: .DS_Store
modified: frontend (modified content, untracked content)

no changes added to commit (use “git add” and/or “git commit -a”)

If I try to git add . it tells me at git status:

On branch master
Changes to be committed:
(use “git restore --staged < file>…” to unstage)
modified: .DS_Store

Changes not staged for commit:
(use “git add < file>…” to update what will be committed)
(use “git restore< file>…” to discard changes in working directory)
(commit or discard the untracked or modified content in submodules)
**modified: frontend (modified content, untracked content)**

I created in PyCharm just a Django and React project and wanted to push the project to a repo on GitHub. Before I pushed the code the terminal of PyCharm showed me:

PyCharm terminal picture

If I try git submodule add <url of rep> react_frontend it tells me that the react_frontend folder is already connected to the repo.

Is that now the new way of pushing to GitHub or what can I do to get the React folder to my GitHub account?

Previous, one month ago, I was capable of pushing a React-Django-Project to GitHub without any issues... Thanks

------- EDIT ---- picture of the React folder

DoriDoro
  • 11
  • 2
  • 2
    Do you have a nested `.git` folder in the react project? – Matt D. Webb Jul 28 '21 at 22:28
  • 1
    [That's not a folder, that's a *submodule*.](https://stackoverflow.com/q/62056294/1256452) – torek Jul 29 '21 at 04:40
  • to @MattD.Webb: no, there is no `.git` folder just a `.gitignore`. will upload a picture of the React folder in my post above – DoriDoro Jul 29 '21 at 11:40
  • @torek: thanks for that link. I will check this link put later – DoriDoro Jul 29 '21 at 11:42
  • The error message suggests there is another git repo, make sure you’ve got hidden folders shown. – Matt D. Webb Jul 29 '21 at 11:43
  • @MattD.Webb and @torek: Of course there is the `.git` file (a hidden file...) when displaying the hidden files in Finder I was able to see it. I will delete the `.git` folder and push again. OR can I add the repo name inside somewhere in that `.git` folder to connect the React folder to the "correct" repo? – DoriDoro Jul 29 '21 at 12:20
  • display the hidden files on Mac in Finder: https://apple.stackexchange.com/questions/5870/how-to-show-hidden-files-and-folders-in-finder – DoriDoro Jul 29 '21 at 12:21
  • Make sure you remove the correct one. The .git folder should be at the root so any nested ones should be removed to the correctly track the full project. – Matt D. Webb Jul 29 '21 at 12:22
  • Thanks Matt. That was really helpful. Done. Awesome! Thanks to Torek too. – DoriDoro Jul 29 '21 at 12:46

0 Answers0