I have a git repository at repo
on my local computer, and on GitHub I have a repo online
with main branches main
and b2
. On my local computer I have branches master
and b2
. The local repo
directory has subdirectory repo\subdir
. On GitHub this subdirectory is not showing up in online
branch b2
(or any other branch, but it will be victory if I can get it on b2
).
Now when I pull up a Powershell pointed to repo
and enter git checkout b2
it says that I'm on branch b2
. I run git add .
and it gives no error messages. If I enter git status
it says that nothing is untracked. I commit and it says the branch is clean, nothing to commit. I push with git push -u origin b2
it says
Everything up-to-date
branch 'b2' set up to track 'origin/b2'.
Everything looks as good as I can imagine!
I go to the GitHub page, and everything else in the repo is there, except for subdir
. No branch, including b2
, contains subdir
. I go to Pull Requests
, set it to main <- b2
and it says there are no differences.
This seems like, whatever this is, I'd expect it to be common. But when I search for other people with the problem, I don't see anything that looks applicable. These are my nearest search results:
Unable to add a directory to git repo
Add directory to existing git repo without subproject?
And I continually asked ChatGPT what to do and I seem to have exhausted all of its ideas.