![]() ![]() The submodule commit f68bed6 has three branches on it that may be used for checkout in the submodule directory. ![]() Now from your primary repository you still have two modified objects. Just easily I could set it to specific commit or tag. The "superproject" shows the sm2 submodule at commit f68bed6 but sm2 has it's HEAD at 5b8d48f. git checkout -b devbranch origin/devbranch Now the submodule is fixed on the development branch instead of HEAD of master. Nothing to commit (working directory clean) gitmodules file located at the root of the parent repository. A submodule can be located anywhere in a parent Git repositoryâs working directory and is configured via a. gitmodulesÄ¡00644 blob e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 mainÄ¡60000 commit 7c5889497938cd5699a9234a98ee93947e52b1ed sm1Ä¡60000 commit f68bed61cba6f94cef57554f2cf46a45a4a0d337 sm2į68bed6 (origin/master, origin/HEAD, master) Initial commit. Submodules are Git repositories nested inside a parent Git repository at a specific path in the parent repositoryâs working directory. " to discard changes in working directory) Using some test directories I set up, here's what the commands might look like: $ git -version These safety and performance issues cannot be backward compatibly fixed and as such, its use is not recommended. With git you can use so-called submodules to make a specific snapshot of a git repository part of another git repository. branch cd path/to/your/submodule git checkout -b branch -track origin/branch, /repo git add path/to/your/submodule git commit -m Make submodule.Finally, git checkout original-commit-branch. git filter-branch has a plethora of pitfalls that can produce non-obvious manglings of the intended history rewrite (and can leave you with little time to investigate such problems since it has such abysmal performance). git fetch origin or git fetch, remote..fetch values are used as the refspecs they specify which refs to fetch and which local refs to update.Then change into the submodule directory and use git log -oneline -decorate to see what branch the original commit is on. This configuration is used in two ways: When git fetch is run without specifying what branches and/or tags to fetch on the command line, e.g. ![]() Use git ls-tree HEAD in the "superproject" folder to see what commit your submodule was originally at. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |