Skip to content

Instantly share code, notes, and snippets.

@emil10001
Last active December 22, 2015 05:49
Show Gist options
  • Save emil10001/6426486 to your computer and use it in GitHub Desktop.
Save emil10001/6426486 to your computer and use it in GitHub Desktop.
Create a submodule in a git project
# where bar.git is the main project
git clone --recursive git://github.com/foo/bar.git
git submodule add git@github.com:user/repo.git
git submodule init
git submodule update
# Might need to cd into the submodule,
# set it to the correct branch and pull
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment