Trip
Trip

Reputation: 27114

How to reverse a `git submodule init`

To get a project started, I had to perform git submodule init followed by git submodule update . But now that the cat's out of the bag, I was wondering if there's something I have to do to pack it back up before committing back up to the repository.

Any ideas?

Upvotes: 2

Views: 1291

Answers (1)

Amber
Amber

Reputation: 526713

Did you make changes to code in the submodules, or only to code in the main repository not part of the submodules?

If you made changes to code in submodules, you first need to go into each submodule you made changes in and commit them to that submodule. After you've done that, then you can commit in the main repository and the new state of those submodules will be recorded.

If you didn't change any files in submodules, only ones in the main project, then no, there is nothing you need to do related to submodules before committing.

Upvotes: 2

Related Questions