0

I'm trying to save all changes I make both in the .html files and in the .css and .js files which are inside folders (for a better esthetic)

Let's assume I have in my local repository the following files and folders:

index.html, about.html, contact.html, and the following folders: CSS, js and fonts. When I type in the terminal git push origin master (I have already synchronized my local to my remote repo), the only things that get uploaded/pushed are the .html files, but my CSS, js, and fonts folders doesn't go to my remote repo. What am I doing wrong?

Thank you, buddies.

Jason Aller
  • 3,541
  • 28
  • 38
  • 38
Julio Rodriguez
  • 499
  • 6
  • 16
  • Git only tracks content, not empty folders. See e.g. [here](https://stackoverflow.com/questions/115983/how-can-i-add-an-empty-directory-to-a-git-repository) – Christoph Jan 08 '18 at 13:10

1 Answers1

1

GIT does not track empty folders. There are multiple approaches to handle this. The easiest is to create an empty file (example name : .gitkeep) in each empty directory so they'll be tracked. There are other solutions to this as well. Some of them are listed below.

Ishan Thilina Somasiri
  • 1,179
  • 1
  • 12
  • 24