<commit_before>---
layout: post
title:  "Removing Git submodules."
date:   2019-10-11 08:30:00 +0800
categories:  git
tags: [ git ]
---
I decided to write this post because I've been getting a lot of tickets
regarding pipelines not working due to improper removal of git submodule/s in
their repo. Here's a simple guide on how to remove Git submodules.

Lets say I want to remove a Git submodule called **drafts**.

1. Edit **.gitmodules** to remove lines that are similar to the example below.
```bash
[submodule "drafts"]
  path = drafts
  url = git://github.com/emcorrales/drafts.git
```

2. Edit **.git/config** and remove lines that are similar to the example below.
```bash
[submodule "drafts"]
  url = git://github.com/emcorrales/drafts.git
```

3. Remove the submodule from the git index.<commit_msg>Change title.<commit_after>---
layout: post
title:  "How to remove Git submodules."
date:   2019-10-11 08:30:00 +0800
categories:  git
tags: [ git ]
---
I decided to write this post because I've been getting a lot of tickets
regarding pipelines not working due to improper removal of git submodule/s in
their repo. Here's a simple guide on how to remove Git submodules.

Lets say I want to remove a Git submodule called **drafts**.

1. Edit **.gitmodules** to remove lines that are similar to the example below.
```bash
[submodule "drafts"]
  path = drafts
  url = git://github.com/emcorrales/drafts.git
```

2. Edit **.git/config** and remove lines that are similar to the example below.
```bash
[submodule "drafts"]
  url = git://github.com/emcorrales/drafts.git
```

3. Remove the submodule from the git index.
{'fraction_non_alphanumeric': 0.10919185687847008, 'fraction_numerical': 0.025909932140653916, 'mean_word_length': 3.8417910447761194, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1680495', 'n_tokens_mistral': 542, 'n_tokens_neox': 495, 'n_words': 222}