Flutter module code not showing up on github
If the repository you are pushing includes a Flutter subfolder with itself a Flutter/.git directory, then that Flutter folder would be a nested repository.
Only its gitlink (tree sha1) would be recorded, not its folder content.
You would need to git rm --cached Flutter (no trailing slash) and remove the Flutter/.git folder in order to be able to add and commit the all Flutter content.
Or you would need to use submodule in order to add Flutter as a full external repository reference: see an example in flutter/flutter issue 3770.
user2143094
Updated on December 22, 2022Comments
-
user2143094 6 monthsI have a Flutter based Android app. The app used to be completely native. Then I decided to integrate Flutter. I use the built in option in Android Studio to push my code to git. Now since the Flutter module is at the parent directory of the app, pushing to git doesn't push the flutter code. What could I do to make Android Studio push Flutter code as well so that the code can be seen on the Git repo?
-
NullByte08 over 2 yearsThere is no .git folder in flutter module. Still flutter module changes are not being registered. -
VonC over 2 years@NullByte08 Can you check what doesgit check-ignore -v -- Flutter/a-File-Inside-Flutterreturn? -
NullByte08 over 2 yearsfatal: not a git repository (or any of the parent directories): .git -
NullByte08 over 2 yearsI am trying git submodules now. Do I need togit initinside the flutter module directory? -
VonC over 2 years@NullByte08 the command should be executed on level above the .git folder. -
VonC over 2 years@NullByte08 And if flutter itself can be declared as a submodule within your project, then you don't need togit initit. -
NullByte08 over 2 yearsthere is no .git folder inside the flutter module's directory -
NullByte08 over 2 yearsLet us continue this discussion in chat. -
VonC over 2 years@NullByte08 If the error message reports a.gitfolder, there should be one (keep in mind, it is hidden by default)