.. include:: /Includes.rst.txt .. index:: Git Git ===== Import a package including history ---------------------------------- The code of an existing repository can be imported with the following command: .. code:: bash git subtree add --prefix=third_party/git https://github.com/git/git.git master You can easily pull back changes from the upstream repository into that folder .. code:: bash git subtree pull --squash --prefix=third_party/git gitgit/master You can also push changes back upstream as follows: .. code:: bash git subtree push --prefix=third_party/git gitgit/master This means we can update our sources during development with the following commands: .. code:: bash git subtree pull --squash --prefix=DistributionPackages/drk_template2016 git/master