Subproject shows some internal changes with commit hash
See original GitHub issueDescription
eeeeehh … wat!!! o____O
So I added a subproject in one of my projects and now I get this weird “change”. I cannot track it down to a specific file. The option in the context menu opens up the projects local folder but does not select the file although I made it show hidden files
. I see there are files with the shown hash inside the .git folder but I could not find any files with the shown Subproject commit
string. So is this some internal thing already? What happens if I discard it? Or submit it even!?!?
Version
- GitHub Desktop: Github Desktop 1.1.1
- Operating system: Microsoft Windows [Version 10.0.16299.371]
Steps to Reproduce
Expected Behavior
- things are not confusing
Yeah sure … other things that could make it so:
- the thing is just hidden
- it says what it is.
- There is a link to its documentation
- there are only helpful context menu options available
- something that says: This is alright! Everything is fine.
Actual Behavior
There is this item. I didn’t create it. I dunno what it does. I have no clue if its good or bad. I’m afraid to submit or discard it although I have the options to do so. It cannot be found in any file. I have no idea if I need to do something about it at all.
Additional Information
I was trying to look up subproject
in open or closed issues. Didn’t find a thing. But somehow I managed to dig up this. Ah a pull request. So there was something about it? But … well I still cannot find any explanations.
Issue Analytics
- State:
- Created 5 years ago
- Comments:7 (6 by maintainers)
Top GitHub Comments
Yes, Git treats submodule changes the same way as it treats changes to any other file.
👍
👍
Thanks for taking the time to open an issue! 🙇
Desktop’s support for submodules is limited at the moment, but I can help nonetheless.
Looks like the change you are seeing is due to a submodule being updated to point to another commit. Have you updated that specific submodule recently or made any commits? If so, you will either need to update the main repo to use the updated submodule or discard the changes and continue using the previous version of the submodule.
Here are steps to reproduce this behavior in the CLI.
Setting up a suitable environment
$ mkdir git-submodules && cd git-submodules && git init -q
$ git submodule add https://github.com/carloscuesta/gitmoji.git
$ git add .
$ git commit -m "add a submodule
Exploring your issue What happens if I make a change to the newly added submodule?
$ cd gitmoji
$ echo "just a text file" > file.txt
$ git add file.txt
$ git commit -m "add a new file
$ cd ..
At this point, from the root of the repository:
Now that I’ve updated the submodule, I have two options: