-3

.gitignore comes up and doesn't allow me to upload my second project into the GitHub.

this is a tree of my codes :

-src -> backend ->[.gitignore , djangoproject] -src -> frontend ->[.gitignore , gui]

so when I push all the folders into Github, .gitignore error comes up so what can I be doing?

Alireza Atashnejad
  • 612
  • 1
  • 6
  • 22

2 Answers2

1

this may happen for several reasons:

1st verify whether you have added the fronend files to your repository or not

2nd check your .gitignore file (if there is any)

Tasnuva Leeya
  • 2,515
  • 1
  • 13
  • 21
  • sorry where is the .gitignore !? – Alireza Atashnejad Jul 28 '20 at 07:20
  • have you created .gitignore file? just check using ctrl+h (linux) . any files added in .gitignore will be ignored to push on remote repo. if there is no .gitignore file. just try `git push` again adding all files using command `git add --all` and push to remote repo after committing your changes. – Tasnuva Leeya Jul 28 '20 at 07:24
  • 1
    additionally check the answer of this link https://stackoverflow.com/questions/62056294/github-folders-have-a-white-arrow-on-them – Tasnuva Leeya Jul 28 '20 at 07:25
0

If there are no files in the directory git will not stage the directory when you run git add. Git does not care about files and directories, it tracks content changes.

UPDATE

If you use submodules (repository inside repository) read this: http://blog.joncairns.com/2011/10/how-to-use-git-submodules/

Ulianka Shu
  • 133
  • 1
  • 12