Assuming that what you mean is:
When I go to GitHub and view the commit, I see this icon: 
what it means is that you committed a "naked" gitlink, i.e., a reference to some other Git repository. This is half of a submodule: a submodule is a reference to some other Git repository that includes the instructions that Git needs to clone that other Git repository.
Removing the gitlink and committing merely made a new commit in which there is no gitlink any more. This did not damage anything. All new commits merely add on to your existing repository; the old commits continue to exist. Checking out the older commit, or using git revert
to back out the changes made by a commit you dislike, will "undo" that effect.
The key difference between checking out an old commit and using git revert
is that the former simply gets you the old commit, as a "detached HEAD". You can work with it, and even create a new branch from this point if you like. Using git revert
tells Git: make another, even-newer commit that undoes the effect of some previous commit. That is, instead of going back in time, you go forward in time but put things back. One method is vaguely analogous to "Gosh, I broke my vase, let me go back in time to before I broke it" and the other is "Gosh, I broke my vase, let me glue it back together".
You almost never want to have a "naked" gitlink. Whether you want to have a real submodule, or just incorporate some other Git repository's currently-checked-out-files into a new commit in this repository, is another question entirely. There are more details at GitHub folders have a white arrow on them.