Search code examples
githubsshgit-submodulesgit-commitcd

How do I perform these commands without getting errors? (git submodule, cd, git commit)


I am a new user to command line. I have downloaded the repo, I do git init every time but still I get this error :

fatal : Not a git repostitory.. .git

EDIT : It also says my repo is empty but I am sure that I did clone and init it!!

These are the commands I am trying -

git submodule add -f -b REL1_25 https://github.com/wikimedia/mediawiki-extensions-CharInsert CharInsert

cd ../ && git add .gitmodules extensions/CharInsert

git commit -m 'Add CharInsert' && git push

Solution

  • The full sequence should be (including directly the existing submodules):

    cd C:\test
    git clone --recursive http://github.com/Reception123/mediawiki
    cd mediawiki
    git submodule add -f -b REL1_25 https://github.com/wikimedia/mediawiki-extensions-CharInsert extensions/CharInsert
    git add .
    git commit -m "Add CharInsert extension"