Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Turn one repo with many directories, into many repos and an additional superproject repo containing submodules

NotificationsYou must be signed in to change notification settings

nyeates/githubDirToSubmodule

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 

Repository files navigation

######################### GithubDirToSubmodule# By Nick Yeates nyeates1 at umbc dot edu# These set of shell scripts will automate the moving of many git # subdirectories in an existing git repository. It moves directories, # one by one, into separate repos, and then makes a submodule reference# to that new seperate repo. The submodule is put into the original# parent repo.## Use the below workflow to use both of the files and an output.txt# file in unison, to complete the job of transfering many directories# over to seperate repos and submodules.## See Notes in directoryList.sh and "Assumes" and "Troubleshooting"# sections in githubDirToSubmodule.sh for additional information.########################WorkflowHow to use the various files to turn sub-directories into separate repos and submodules=Which sub-directories=1) Update directoryList.sh with the 'Directory' variable referring to the repo where you have many subdirectories2) Run directoryList.sh and examine output - look that all directories you want are there and look right - assure that each line looks like: /path/to/dir/nameOfDir nameOfDir/3) Output to a file Ex: ./directoryList.sh > output.txt4) Remove any directories that you dont want separated=Change sub-directories into repos and submodules=1) Set variables in githubDirToSubmodule.sh - ParentRepoPath, DirectoryListingFile. NewContainingDir, GitHubUserName, GitHubToken and SuperprojectPath - Assure that directories and repos exist2) Assure that "break" is NOT commented out - We want to only let the loop run once in order to test it and see that it works - This is especially important if you have many subdirectories that you are running this on3) Run loop once - ./githubDirToSubmodule.sh - Look for good output4) Remove first directory from output.txt - We have run it on this first one, and so now only need to run it on the others5) Run script on all other directories - remove the "break" to do this - ./githubDirToSubmodule.sh

About

Turn one repo with many directories, into many repos and an additional superproject repo containing submodules

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages


[8]ページ先頭

©2009-2025 Movatter.jp