1

I am using git and uploading all of my files to github. The files that are located in the view/ folder that end in a .jade file extension are not getting uploaded to github.

To go even further for what I did, I made sure the original source on my mac had the .jade files and they existed in the view/ directory (they existed and had text content)

I pushed to github. everythings good.

I changed to a Junk/ directory and did a git clone

I opened the views/ directory and... no files exist. No .jade files when they should all be there.

Any help would be much appreciated. If nothing else point me in the direction for a solution to this issue

Am I going to have to 'hack' it and use some sort of push hook to change all the .jade files to .txt before pushing and after pulling have another script to go and change all .txt files that exist in the views/ directory to have the .jade file extension? Right now that is all I can think of... so hopefully I'm missing a setting or something really simple without having to write code!

Here is what the view folder looks like on github (you cannot click on it on the website because its grayed out..?)

enter image description here

Coty Embry
  • 958
  • 1
  • 11
  • 24
  • what's your .gitignore file says? – Asim K T Dec 23 '16 at 04:21
  • Are they committed locally? – Joe Phillips Dec 23 '16 at 04:22
  • and so @JoePhilllips how it went was: created all files and first git init on a mac, which had the .jade content, i.e. the textual content of the file. I then did a `git push origin master` and theres my master branch. Then on another windows computer I did a git clone. From there all the views/*.jade files did NOT exist locally on the now most recent windows machine. – Coty Embry Dec 23 '16 at 04:59
  • @AsimKT with cygwin I do `ls -alrt` in the root directory. this shows a .git file exists but does not show a .gitignore (unless im totally missing it) – Coty Embry Dec 23 '16 at 05:00

1 Answers1

3

views/ is represented here as a nested git repo (meaning you have a .git/ subfolder inside the views folder).
From its parent repo perspective (your repo), it is just a gitlink (a special entry in the index, representing the SHA1 of that nested repo)

If you need its content, you need to:

  • delete the gitlink (git rm --cached views, no trailing slash: 'views', not 'views/')
  • add its content to your index: git add views
  • commit and push
Community
  • 1
  • 1
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • dude it worked! Thank you so much, I have a question. How did you know that a .git/ subfolder was inside the views folder? That is what you was saying right? Maybe im missing the point, but I changed into the views directory and did ls -alrt and did NOT see a .git file. Im confused because you referred to it above as .git/ which is like a directory and not like .git which is a hidden file. Sorry, I just want to make sense of it. Thanks again – Coty Embry Dec 23 '16 at 06:07
  • 1
    The gray icon is for nested repository, hence me assuming it was including a .git folder. But it doesn't have to. A gitlink is just a sha1. Removing and adding its content is enough here. – VonC Dec 23 '16 at 06:19