Welcome toVigges Developer Community-Open, Learning,Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
4.1k views
in Technique[技术] by (71.8m points)

github - git submodule not pushed to private repo

The issue I'm having. I created a submodule of a template (CSS_template) that I'm using for a website I'm building. I made another submodule of that submodule template (Dev_CSS_template). As I execute git add . and git commit. Nothing was being pushed to the remote repository and the submodule in GitHub is not highlighted blue, I also can't access the files on GitHub. I tried to add the submodule to git and path but I get fatal: remote origin already exists. No files are uploaded to the repo. I think I accidentally deleted the .gitmodules file.

git config in submodule (Dev_CSS_template)

[core]
   repositoryformatversion = 0
   filemode = true
   bare = false
   logallrefupdates= true
[submodule "repo_name"] 
   url = https://github.com/username/repo_name/Dev_CSS_template
   active = true 
[remote "origin"] 
   url = /username/repo_name/Dev_CSS_template
   fetch = +refs/heads/*:refs/remotes/origin/*

So how can I add the file to submodule of repo. branch that the submodule is currently in? I've tried git remote add url git submodule add url

Is this because the submodule is from another submodule, that is outside of the repo (forked)


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
等待大神解答

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to Vigges Developer Community for programmer and developer-Open, Learning and Share
...