The simple answer to your question is turn off the supply. Hot water is expelled from the tank into the pipe by the incoming cold water. Shut that off and no water is released when you open the the hot water line. What concerns me is how you are going to connect the new line. The nature of your question leads me to wonder if you have the know how to do this job. A little more explanation of what you are planning might clear this up.