I want to use in repo A
some changes of repo B
. B
does not belong to me. A
is mine.
I did :
git submodule add -- https://github.com/debois/elm-mdl.git external/elm-mdl
i.e. B
is elm-mdl
I had already cloned the repo, hence --
in above command.
I then run :
cd external/elm-mdl
git checkout v9
git checkout v9-my
.. make some changes and commit.
cd ../..
Back in A
's root
git config -f .gitmodules submodule.external/elm-mdl.branch v9-my
└─ $ ▶ cat .gitmodules
[submodule "external/elm-mdl"]
path = external/elm-mdl
url = https://github.com/debois/elm-mdl.git
branch = v9-my
Now, how can I keep these commits saved as i can not update or create a branch in remote repo B
i.e. elm-mdl
?
I can not update the remote :
ashish @ 7567 ~/work/be_autonomous (master)
└─ $ ▶ git submodule update --remote --merge
fatal: Needed a single revision
Unable to find current origin/v9-my revision in submodule path 'external/elm-mdl'
ashish @ 7567 ~/work/be_autonomous (master)
Can I save these commits in my original repo A
?
Or what are the alternatives?