I have had the same problem.
In my case, since I have the original repository in my local machine, I have made a copy in a new folder without any hidden file (.git, .gitignore).
Finally I have added the .gitignore file to the new created folder.
Then I have created and added the new repository from the local path (in my case using GitHub Desktop).