In April 1199, Richard I, the King of England, died, and he was succeeded by his brother John, who held the title of "Lord of Ireland". From that point, the King of England was also Lord of Ireland. Under the Crown of Ireland Act 1542, the Irish Parliament recognised Henry VIII as being King of Ireland.
In March 1603, Henry's younger daughter - and last remaining legitimate descendant - Elizabeth I, Queen of England and Ireland, died. Under the terms of his will, if this happened, then the throne would go to the descendants of Mary, the youngest of his two sisters. Mary had, unsurprisingly, died a long time before her niece (just under half a century earlier, in June 1533). Neither of Mary's sons achieved adulthood, so we need to look at her daughters. The elder was Frances, who had died in November 1559, and she had had 3 daughters - the eldest of which, Jane, had briefly been Queen. The second daughter, Catherine, had died in January 1568, being married to Edward Seymour, the nephew of Henry's third wife, Jane.
If Henry's will had been followed, then the next Edward Seymour, Catherine's 41-year-old son, would have succeeded Elizabeth as Edward VII, and today we would have Teresa Freeman-Grenville as Queen.
However, the elder of Henry's sisters was Margaret, who had married James IV of Scotland, and hence was grandmother of Mary, Queen of Scots. And upon Elizabeth' death, Mary's son, James VI of Scotland, became King of England and Ireland. This is the Union of Crowns. Note that England and Scotland were legally distinct countries (as indeed was Ireland - to which we come to later).
You might notice that I have not mentioned Wales - at the time, it was part of the Kingdom of England.
In May 1707, the Kingdoms of England and Scotland united to form Great Britain.
In January 1801, Great Britain and Ireland united to form the United Kingdom - which reduced in size when the Irish Free State was created in December 1922.
First thing to note - and very important to note - there is no such person as "the Queen of England". Hasn't been for the past 307 years. In discussions about Scotland's future, have no time for silly ideas that Scotland would have to lose the Queen if it becomes independent. It was the Scottish royal family that got the English throne, not vice versa.
When it comes to discussing Scottish independence, we have been here before. As I have mentioned, the United Kingdom used to be a bigger place until about 92 years ago, when 26 counties in Ireland became a separate nation. There is nothing new in the issues independence raises.
It is true that the Irish Free State, as per Article 60 of the 1st Schedule of the Constitution of the Irish Free State (Saorstát Eireann) Act, 1922, had a Governor-General to exercise regal functions on behalf of George V. The post's functions were abolished under the Constitution (Amendment No. 27) Act 1936 and in December 1936, Domhnall Ua Buachalla left office (by giving Royal Assent to that Act) and was not replaced. The post of Governor-General was abolished by the Executive Powers (Consequential Provisions) Act 1937.
But Scotland is a slightly different case to the Irish Free State. The monarchs of England (and later Great Britain) were the monarchs of Ireland from 1199 to 1707 due to conquest. In 1603 the Scottish monarch became also the English one. The Royal Family had no personal residences in Ireland, while in Scotland there is Balmoral - a place I have visited a few times, mainly to see Crathie Kirkyard where my great-great-great-grandfather, John Spong (who was Queen Victoria's travelling tapessier) is buried. There is a royal presence in Scotland which there wasn't in Ireland. Scotland is a home for the royals.
Scotland is not like Canada or Australia or New Zealand - all of which were British colonies which became independent while keeping the British monarch as head of state. Scotland is an old nation. It existed before the United Kingdom was thought of. It has never been a British colony.
A Governor-General for Scotland would send the message that the Queen is - as she is gratingly referred to by ignorant people - "the Queen of England". That the granddaughter of a Scottish duke has a looser connection with Scotland than she does with rUK. That Balmoral is her holiday home for when she is in ex-pat mode.
If Scotland becomes independent, then the Queen will be head of state of both nations - Scotland and rUK - equally. It will be up to her, Edinburgh and London to sort out how she divides her formal time.