Skip to content

Working with Git

J.L Stevens edited this page Jul 21, 2014 · 5 revisions

Submodules

Updating Submodules

To make sure your submodules are up to date run:

git submodule update

Making commits to submodules

  1. Make your changes to the submodule.
  2. Commit your changes to the submodule.
  3. Push your changes to the remote submodule repository.
  4. The superproject will register the change to the submodule, which you will then need to commit.

Using the SSH protocol

In some environments the https protocol may not be available. In order to use submodules without changing the .gitmodules file you can do one of the following:

  1. Run git config --global url."[email protected]:".insteadOf https://github.com/

  2. Modify your .gitconfig (in your home folder) to contain the following lines:

    [url "[email protected]"]
       insteadOf = https://github.com/
    

In order to use SSH with GitHub you will also have to set up SSH Keys as detailed in these instructions.