I love iTerm2, much more than the default terminal that is shipped with the Mac OS, but I could never figure out how to reattach a detached window as tab to another window. After some futzing around, I finally figured it out.

Go to iTerm -> Preferences -> Appearance. Next de-select the “Hide tab bar when there is only one tab” checkbox. Now you can drag the detached window into the tab bar of the other window, and bam, it is now a tab of the window.