'Folders not pushed to Git remote repository
I am trying to push my project folder to my repository on GitHub. The project has two separate folders, one for back end and one for front end. I gave the following commands from the main folder which contains these folders:
git init
git add .
git commit
git remote add origin https://github.com/<reponame>/Todo.git
git push -u origin master
The push was successful. It didn't give any errors.
upon git status
it shows,
On branch master
Your branch is up to date with 'origin/master'.
nothing to commit, working tree clean
But when I go to my repo, I could only see my back-end folder and its contents. The front-end folder icon appears with a arrow mark, but it has no content.
What could be wrong? How do I push both the folders together? Attached image for reference. enter image description herePlease help.
Solution 1:[1]
git add .
will add any changes from the current folder.
git add --all
will add any changes from your repository
Solution 2:[2]
git init
git add *
git commit
git remote add origin https://github.com//Todo.git
git push -u origin master
// this worked for me //
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | kryptobi |
Solution 2 | Avinash Kumar |