I downloaded a module from github. But instead of using the github repository, I initialized my own and pushed all the code to my own bitbucket remote repository with one "initial commit".
But I would like to use the github repo, so that it is easier to keep it up to date. So I opened .gitmodules
and changed the URL of the repo, made a commit and pushed.
But if I execute git clone myrepo_url.git
and then execute git submodule --init --update --remote
then everything is fine, but the module where I changed the URL.
> fatal: Needed a single revision, unable to find commit of
> origin/master in Submodul-path 'app/code/EthanYehuda/CronjobManager'
Thats maybe because my old repository used master
as the main branch and the github repository uses 1.x
.
.git/modules/app/code/EthanYehuda/CronjobManager/config:
[core]
repositoryformatversion = 0
filemode = true
bare = false
logallrefupdates = true
worktree = ../../../../../../app/code/EthanYehuda/CronjobManager
[remote "origin"]
url = https://github.com/Ethan3600/magento2-CronjobManager.git
fetch = +refs/heads/*:refs/remotes/origin/*
[branch "1.x"]
remote = origin
merge = refs/heads/1.x
.gitmodules
[submodule "app/code/EthanYehuda/CronjobManager"]
path = app/code/EthanYehuda/CronjobManager
url = https://github.com/Ethan3600/magento2-CronjobManager.git
How can I fix this so that the error does not show if I clone the project?