---
title: "Discussion on \"How to move a directory as a git submodule\" | Hashnode"
description: "Discussion on \"How to move a directory as a git submodule\". Create a git repo using the directory content.\nDelete the directory content from the original repo (if existing in current git repo being used)\nNow add this newly created repo as a submodule.\ngit submodule add <git-repo-link>\nEg.\n\ngit submodule add h..."
url: "https://hashnode.com/posts/how-to-move-a-directory-as-a-git-submodule/62a8eb3f0baf4306d94946a5"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [How to move a directory as a git submodule](https://jsbisht.hashnode.dev/how-to-move-a-directory-as-a-git-submodule?utm_source=hashnode&utm_medium=feed)

Create a git repo using the directory content. Delete the directory content from the original repo (if existing in current git repo being used) Now add this newly created repo as a submodule. git submodule add <git-repo-link> Eg. git submodule add h...

Jun 14, 2022 · 1 min read · jsbisht.hashnode.dev  
Read the article

-   [#git](https://hashnode.com/tag/git)

## Written by

[JAGDEEP BISHT](https://hashnode.com/@jsbisht)

@jsbisht · Bengaluru, India

  
[View profile](https://hashnode.com/@jsbisht)

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
