logo
down
shadow

Need a subdirectory not a submodule


Need a subdirectory not a submodule

By : Семён Александровски
Date : November 22 2020, 09:00 AM
it helps some times If you just want the files without the development history, you can simply copy each of the original repositories to the new one, deleting the .git folder in the copy-and-pasted repositories.
If you want to preserve the development history, follow the instructions in this post.
code :


Share : facebook icon twitter icon
Git submodule from subdirectory?

Git submodule from subdirectory?


By : user2121280
Date : March 29 2020, 07:55 AM
hop of those help? Have you considered splitting up the 'Projects' in RepoA such that they are separate repos? You could do this by using git subtree split. Then you include the Project1 repo as submodules in both RepoA and RepoB.
Git: Conversion of a Subdirectory to a Submodule

Git: Conversion of a Subdirectory to a Submodule


By : user3663950
Date : March 29 2020, 07:55 AM
I think the issue was by ths following , I have successfully been able to convert Submodules to Subdirectories using commands such as the methods outlined in these two examples: , For me it worked after adding a trailing slash to the directory:
code :
$ git filter-branch --subdirectory-filter htdocs/typo3_src -- --all
Rewrite cbe03e13da071403a2632263f1760b560398cdd3 (1/12) (0 seconds passed, remaining 0 predicted)    004b20fc15023539484c7f5990b99780f54dc0ac
fatal: failed to unpack tree object cbe03e13da071403a2632263f1760b560398cdd3:htdocs/typo3_src
Could not initialize the index

$ git filter-branch --subdirectory-filter htdocs/typo3_src/ -- --all
Rewrite ec6e3c7212f1080fc052c87b1129335ab5bee524 (5/10) (1 seconds passed, remaining 1 predicted)    
Ref 'refs/heads/master' was rewritten
Ref 'refs/remotes/origin/master' was rewritten
Ref 'refs/remotes/origin/develop' was rewritten
WARNING: Ref 'refs/remotes/origin/master' is unchanged
WARNING: Ref 'refs/tags/0.0.1' is unchanged
Keep git log of a subdirectory, not as a submodule

Keep git log of a subdirectory, not as a submodule


By : MHoltan
Date : March 29 2020, 07:55 AM
hope this fix your issue It became not a submodule, after git init on the root directory. store_app directory stays submodule here:
code :
$ git rm --cached store_app   # index file name
$ git add store_app           # directory name
$ git rm --cached store_app
$ git init
$ git add store_app
How can be a subdirectory added as submodule in git

How can be a subdirectory added as submodule in git


By : S Visuvas
Date : March 29 2020, 07:55 AM
will help you I don't believe you can do it. git submodule tracks entire repositories as a submodules. You can try sparse checkout on the submodule, that the best I could imagine.
Subdirectory from github as a git submodule

Subdirectory from github as a git submodule


By : Aaron Thomas
Date : March 29 2020, 07:55 AM
may help you . You can try the sparse checkout along with submodules.
Set Git submodule to shallow clone & sparse checkout?
Related Posts Related Posts :
  • Moving all but one folder to sub-directory - git
  • eb deploy --staged usage
  • GitHub SSH Key claiming it is not used
  • How to default/config git log -n param?
  • How to set git diff parameter in Github desktop gui
  • How to create a new SNAPSHOT branch from a release tag using mvn release:update-versions?
  • Git clean removed files not shown in git status
  • Cloning from Github to a specific directory results in an empty directory. Where are the files?
  • Git cloning a repository that is already a clone
  • PhpStorm and Git - Push failed - Failed with error:
  • Git * text=auto in the gitattributes file and line endings
  • git flow branching model... how does 'qa' branch fit in, with jenkins auto deploy?
  • GitHub repo changed to "other" repo
  • how to fix git annex function in bash?
  • Git committed file but it's not in the repo
  • How git "hides" files between branches?
  • Git - Unable to fetch/pull/clone
  • How to search for a commit in Git?
  • Rename multiple names and emails in a single pass of git-filter-branch
  • clean git history of deleted files, keeping renamed files history
  • sh: parse_git_branch: command not found
  • New repo command ( 1.22) is available
  • git: what commit was I on before I merged?
  • How can I strip .git files from submodules if submodules may have common parent directory?
  • "git svn" showing many removed svn tags
  • Show combined diff from selected git commits
  • Can I use a Github repository as the source of a Docker image?
  • Bower install fails with Git ETIMEDOUT package errors and Exit Code #128
  • git read-tree removed all the history
  • Files are being created in both branch and master while in the branch, why?
  • Cannot push to a remote branch
  • Make git store text files with CRLF line endings with .gitattributes
  • Git describe fails to return most recent annotated tag
  • In Git how can you check which repo in Github you are pushing to from the command line?
  • git reset vs git reset HEAD
  • How to configure Shippable to build all projects from single repository?
  • gitignore for vim plugin
  • Bluemix: How I can configure a delivery pipeline stage build to tag git?
  • Creating a new remote repository on GitHub using git remote add origin
  • How to ignore to level directory in Git but not other directories starting with same name?
  • Error commit, and push in bitbucket
  • Is there any preferred way to change versions with files in git?
  • how to show all commited sql files in git from a specific commit on
  • How do I rename a git remote?
  • Proper git etiquette for users working in mostly-isolated branches?
  • Gitlab can't clone repository even though ssh works
  • How do I rename a root project folder without hindering my team?
  • How to fix permission/link path on git for OSX
  • Using Brackets as git core.editor - OSX
  • Does git pull affect remote tracking branch?
  • Git error when trying to sync fom Visual Studio 2015 (hook error update)
  • difference between soft reset and amend commit in git
  • Jenkins error - cannot connect to repository
  • Maven release plugin shows plaintext password on git push error
  • Pkg.add("IJulia") yields "ERROR: failed process Process(`git clone ... "
  • ghprb - adding content to build status messages?
  • git - squash - rebase - master history concerns
  • auth failed with Egit (ssh configuration)
  • How to create multi-branch project with Jenkins DSL plugin?
  • Average date of last line edit
  • shadow
    Privacy Policy - Terms - Contact Us © animezone.co