11

I added a subtree via

git subtree add --prefix=path/to/example --squash [email protected]:johndoe/example.git master 

and want to remove it. There's no git subtree rm command. I already deleted all files in path/to/example but path/to/example still appears when I list subtrees via

git log | grep git-subtree-dir | awk '{ print $2 }' 

How can I remove the subtree reference from git such that it can no longer be pushed/pulled/etc.?

1 Answer 1

5

Simply remove the remote, which is the subtree reference: git remote rm example

Sign up to request clarification or add additional context in comments.

1 Comment

There are multiple subtree types in the wild, unfortunately.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.