

No changes added to commit (use "git add" and/or "git commit -a") " to discard changes in working directory) Your branch is up to date with 'origin/master'. HEAD is now at 7735cf8 Added greeting3 function. If you want to create a new branch to retain commits you create, you mayĭo so (now or later) by using -b with the checkout command again. State without impacting any branches by performing another checkout. You can look around, make experimentalĬhanges and commit them, and you can discard any commits you make in this
Add a git submodule install#
Typically, we install a Python package from PyPi. What is Development Mode?ĭevelopment mode allows a project to be both installed and editable. To ensure that we use the correct branch or version of commonlib when we work on myproj, we can set the dependency as a Git submodule. On the one hand, during the development, myproj may need to stick with a specific version or branch of commonlib, but other projects may need a different version of commonlib. Second, commonlib is used by many projects, including myproj. This is the issue that development mode comes to solve. If we install commonlib in the usual way, e.g., pip install, we cannot use Git to track our changes of commonlib. However, myproj needs commonlib, which we also work on at the same time. Then, we start working on our project, i.e., myproj in this case. Setup Development Mode with Git Submoduleįirst of all, for Python project development, we usually set up a virtual environment and install all the dependencies into the virtual environment.
Add a git submodule update#
Add a git submodule how to#
This article demonstrates how to use development mode and submodule to deal with this situation. If both commonlib and myproj happen to be Python projects, we can use setuptools’ development mode (development mode) and Git submodule (submodule) to make the work easier. While we are working on myproj, we may also need to update commonlib at the same time. A project called myproj has a dependency on commonlib.

The library is self-contained and has its test suite and document. A common library, say commonlib, is used by many projects.We have two projects, and each of them has its Git repository: The scenario may look like the following: As a software engineer, it is not uncommon that we work on a project that has a dependency on the other project that we also work on at the same time.
