Reputation: 699
I am working with the Github windows client connected to my remote bitbuckket git. I recently started building a mobile version of my application in /mobile
I have been working in localhost/WEBSITENAME but am now in loaclhost/WEBSITENAME/mobile with the git repository folder set to the WEBSITENAME folder.
After creating the new folder Github is not detecting the new folder preventing me from pushing my new files.
Upvotes: 29
Views: 71155
Reputation: 73
For me it was a wrong repository 🤣 So make some small modification, push the repo and check if the last update is of few moments back.
Upvotes: 0
Reputation: 1
I met the same problem, and a figure out that's come from the content in file .gitignore
. The content was like this : "# created automatically /n *"
. and the fatal is "*"
: it means you ignore all coding file in this resposity, so the $git status
cant detective the coding file. just delete the "*"
in .gitignore
. it may the point.
Upvotes: 0
Reputation: 75
I faced the same problem
and didn't find the root of the problem but i found a way to solve my problem.
First of all, make copy of local MOBILE folder and delete it.
open your git in internet browser.
go to your WEBSITENAME directory.
find create new directory
button in the user interface and create MOBILE
directory.
This action will be pushed as a new commit in the current git branch.
run git pull
in local, and see the created diretory
copy the old MOBILE directory into new one.
run git status
and you see every thing is OK
I hope helpful. :)
Upvotes: 0
Reputation: 1990
Make sure that there is no .gitignore file anywhere in the folder that is blocking the specific folder you are trying to add or the file or its extension
Upvotes: 10
Reputation: 81
In that case you should check whether you have put /mobile
in your .gitignore file. Or the solution provided by @meda would work.
Upvotes: 7
Reputation: 45490
If your directory structure looks like this:
/------WebsiteName/
|
|-----------/Mobile/
Then make sure you are in WebsiteName directory, then run git status
If you are still getting the same error then run the following in order:
git init
git status //here you should see the mobile folder and its files
git add --all
git commit -am "committing"
git push --all
Upvotes: 21
Reputation: 955
Git will ignore empty folders. Make sure at least one file is present in the new folder in the Git repository, or else you are not able to add it.
Upvotes: 82