I am new to git and I am sure this is a pretty simple fix, but here goes..
I have a git repository with two files: client
and server
.
In my local machine these two files are located in a parent folder, we'll call Parent
.
I've been doing my regular git commands off of this Parent folder
(add/commit/push) and everything has been going fine until I checked my repo on GitHub and discovered only the server
folder was updating. My client
folder is completely empty.
If I run git status
in the Parent folder I get:
Your branch is up to date with 'origin/main'.
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)
modified: client (new commits)
no changes added to commit (use "git add" and/or "git commit -a")
So, I thought: if I cd
into 'client' and do the regular git commands (add/commit/push) this would solve the problem. However, when I check my GitHub repo I see a status change with my commit message next to the client
folder, but still no files added. Even if I did solve the problem by doing this, it would be super inconvenient to constantly cd
into the client folder to commit client folder changes...
How do I get both folders to update? I want to use my git commands on the Parent
folder and have BOTH sub folders update.