Answer the question
In order to leave comments, you need to log in
How to make comments in code just for yourself?
How can I write comments in the code so that they do not get into the repository? An example of a situation: I’m a junior / trainee, I come to my first project, I get a certain task, I pull together a repository and try to figure it out somehow and, of course, I write comments explaining the work of certain pieces of code. Then I complete the task and push back to the repository. How can I prevent my "code notes" from getting into master?
Answer the question
In order to leave comments, you need to log in
I want - I index entire blocks, but I want - only selected lines. Atlassin SourceTree.
Details in the comments above :)
There is such a thing, a notebook is called, so you make notes for yourself in it
If later you don’t need these comments yourself, then just start your own git hook (written by you in a language convenient for you), which will overwrite your special comments in the files before sending (for example, by some label).
If needed, then there seemed to be plugins for different ide allowing you to write comments to the file (not in the code), google for your own.
Deleting comments before submitting and pasting them back into the code is not an option, notable hemorrhoids will arise with merges and conflict resolution.
PS In general, just write comments carefully and upload them along with the code. Documentary comments are not superfluous at all.)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question