If you moved the whole line, it should not have changed.
I can think of a couple of things that might have happened. If the following doesn't help, would you please say exactly what steps you took (specifically which tools and which commands/buttons)?
For example, if you used the Node tool to move the line, maybe you didn't have all the nodes selected. If that happened, then the line would no longer be straight. Or when you say you "connected the line to a node", maybe you used 'Join Seleceted Nodes'? If they were not exactly on top of each other, occupying the same coordinates, the node where they are now connected is halfway between the original 2. That could have distorted both lines.
Do I understand the problem correctly? One straight line lying at 30 degrees, and another straight line, angle unknown. The 30 degree line needs to meet the other line at a certain point. If that's the situation, there are probably a few ways to accomplish this.
I would use Snapping (Enable Snapping, Snap Nodes or Handles, Snap to Cusp Nodes, and if the other node is smooth, also Snap to Smooth Nodes. So that 3 or 4 buttons on the Snap control bar are engaged, and all the others not. Using the Selection tool, grab the 30 deg line near the end where it will connect to the other line, and drag it towards that node. When it gets close, it will Snap (jump out of your control and land precisely on the node so that both nodes now occupy the same coordinates). (Note this also requires enabling Inkscape Preferences > Snapping > Only snap the node closest to the pointer. It's not required for snapping, but I find I have better control using that option. Without that option enabled, it will still snap to the node, no matter where you grab the line. But if you were in tight spaces, other nodes could try to snap as well.)
If I've misunderstood the situation though, please correct me, and I (or someone) will try again
