Alex
Alex

Reputation: 1099

Adding folder to GitHub shows up as binary file

I am trying to add a folder which contains other folders and files to my git repository. The steps I have taken are as follow:

  1. Created a repo on GitHub.
  2. CD'd into the directory I want the repo to be.
  3. Cloned the repo.
  4. Copied some files into the newly cloned repo on my local machine.
  5. Used 'git add .' to add files and folders to GitHub.
  6. Git commit -m "First commit"
  7. Git push.

The result I am getting is that a folder called 'src' is being created in GitHub, but it is empty and states that it is a submodule.

On my local machine src contains two more folders (styles and php) and also a file (index.php).

I have tried different commands such as git add -A, git add --all, adding the force tag and so on, but with no luck.

Any help will be appreciated.

Upvotes: 1

Views: 341

Answers (1)

ckruczek
ckruczek

Reputation: 2410

As we discussed in the chat it turned out that the .idea provided by PhpStorm is causing the problem. So to solve the issue you have to copy the individual files of your project but excluding the .idea file.

Upvotes: 2

Related Questions