It will split out the content of a normal subdirectory into a branch and start tracking it as a subrepo. If you want to expose a subdirectory of your project as a published subrepo, this command will do that. Turn an existing subdirectory into a subrepo. The clone command accepts the -branch= -edit, -file, -force and -message= options. The -method option will decide how the join process between branches are performed. The -force option will "reclone" (completely replace) an existing subdir. From the subdir, all the current information about the subrepo can be obtained. The presence of this file indicates that the directory is a subrepo.Īll subsequent commands refer to the subrepo by the name of the subdir. This information is also stored in a special file called /.gitrepo. The subrepo history is squashed into a single commit that contains the reference information. The repo will be fetched and merged into the subdir. You just specify the remote repo url, and optionally a sub-directory and/or branch name. Keep reading… git subrepo clone Īdd a repository as a subrepo in a subdir of your repository. Please note that the commands are not exact equivalents, and do not take all the same arguments. They also attempt to give similar output in an attempt to make the subrepo usage intuitive to experienced Git users. ![]() CommandsĪll the subrepo commands use names of actual Git commands and try to do operations that are similar to their Git counterparts. ![]() Note: git-subrepo needs a git version (> 2.7) that supports worktree:s. The complete "Installation Instructions" can be found below. Trivial to try any subrepo operations and then reset back.ĭoes not introduce history that messes up other git commands.įixes known rebase failures with git-subtree.Įcho 'source /path/to/git-subrepo/.rc' > ~/.bashrc You can see the subrepo history with git log subrepo//fetch.Ĭommits pushed back upstream are not condensed (by default). Pulls can use a merge, rebase or force strategies. Upstream history (clone/pull) is condensed into a single commit. You can init an existing subdirectory into a subrepo. Moving/renaming/deleting a subrepo subdir JustWorksâ„¢. Subrepo repositories can contain subrepos themselves.ĭifferent branches can have different subrepos in different states, etc. Owners do not deal with the complications of keeping submodules in sync. Well named branches and remotes are generated for manual operations. gitrepo file never gets pushed back to the subrepo upstream. Users do not need to install git-subrepo, ever.Ĭollaborators do not need to install unless they want to push/pull.Ĭollaborators know when a subdir is a subrepo (it has a. Users get your repo and all your subrepos just by cloning your repo. Simple and intuitive commandline usage (with tab completion). The git-subrepo command benefits these roles in the following ways: ![]() Users - People who are just using/installing the repo.Ĭollaborators - People who commit code to the repo and subrepos. Owner - The person who authors/owns/maintains a repo. ![]() It assumes there are 3 main roles of people interacting with a repo, and attempts to serve them all well: This command is an improvement from git-submodule and git-subtree two other git commands with similar goals, but various problems. Later on, upstream changes can be pulled in, and local changes can be pushed back. This git command "clones" an external git repo into a subdirectory of your repo.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |