GitCheatSheet.org logo
Home / How To

Push a subtree

git subtree push --prefix my-nested-repo https://gitcheatsheet.org/example-git-repository.git main

Pushes the changes made in "my-nested-repo" into the "main" branch of the specified repository url. Note: instead of specifying the url directly, you can use a remote name, if configured.