In addition to this question Should Git be used for documentation and project management? Should the code be in a separate repository? I want to ask if it is recommended to keep the documentation version (e.g.: for a REST API) the same as project version, assuming the code and documentation are in the same git repository.
So this means that if changes are submitted in project code and the project version will increment, the documentation version will also increment, even if there isn't any change in the documentation.
What would be the advantages and disadvantages of this practice?
I am asking this because I want the documentation (in my case the documentation is generated using apidocjs from code comments of a node.js
project) to copy automatically the version from the project settings (package.json
). This will simplify the documentation versioning, because I don't have to remember to update it, so it will always be in sync with the code.
I know this question is subjective but I couldn't find anywhere a clarification on this.