1

A cloned project from git repo A was copied in another folder in the local system and tried to be pushed in an another new repository B.

All the files except the previous cloned project folder got pushed successfully. The folder in the git repo showing as [folder_name]@232435.

I want to remove this remote folder removed from repo, and push the folder successfully in the repo without any sub modules coming into picture.

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
Rajeshwar
  • 391
  • 1
  • 5
  • 19

1 Answers1

0

If you want to convert a submmodule into a regular folder, you can:

  • delete that submodule (but keeping its content) on the disk.
    (Here asubmodule represents 'folder_name')

    mv asubmodule asubmodule_tmp
    git submodule deinit asubmodule    
    git rm asubmodule
    # Note: asubmodule (no trailing slash)
    # or, if you want to leave it in your working tree
    git rm --cached asubmodule
    mv asubmodule_tmp asubmodule
    
  • add the files of that (previously submodule) folder to your current repo, and push.

    git add .
    git commit -m "Add  files from removed submodule"
    git push
    
Community
  • 1
  • 1
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250