0

I am new to GitHub. I have created a submodule, but I am having trouble referencing a CSS file.

A grey folder shows up in my account, but the URL still references the other project. How can I get it to reference mine?

Example:

My account structure: github.com/myaccount/Project/custom.css

Other account structure: github.com/otheraccount/Project/additonal.css

I need to modify this somehow so that additional.css is part of my repo, like this:

github.com/myaccount/Project/additional.css.

Basically whenever the other user updates his additional.css, the changes will automatically appear on my site.

JD06
  • 191
  • 11

1 Answers1

0

I believe you can edit .gitmodules, then do a git submodule sync. See Changing remote repository for a git submodule

However, your question isn't clear, as pointing the URL to your own submodule means when they update, it won't sync, unless you manually pull. Also, you can't have a single file as a submodule.

It'd probably work more like:

github.com/myaccount/Project/custom.css
github.com/myaccount/Project/otherProject/additional.css

Also, submodules do not automatically update, you'll have to manually do something like

git submodule foreach 'git pull' 

to update all your submodules

Community
  • 1
  • 1
jhnphm
  • 66
  • 1
  • 3