<P> The department commanders and their staffs also worked directly with the governments of the states within their department . At first these were the ad hoc provisional governments developed in 1774 and 1775, but the practice continued after 1776 when the states replaced their Provincial Congresses and Conventions with permanent governments operating under written constitutions . Ordinarily departments were commanded by major generals . Washington as a full general was the ranking general officer in the Continental Army throughout the war . </P> <P> In general there were seven territorial departments, although their boundaries were subject to change and they were not all in existence throughout the war . </P> <P> The establishment of the Canadian Department reflected the aspirations of the Continental Congress and some Americans to annex the British province of Quebec, then often referred to as "Canada", but the effort was ultimately unsuccessful . Although the Americans captured Montreal in November 1775, and established their headquarters at Château Ramezay, the region was never entirely under the control of the Continental Army . The Canadian Department was formally established from the New York Department on January 17, 1776 . After the Invasion of Canada failed, all troops were withdrawn to Fort Ticonderoga, New York . The Canadian Department was officially discontinued on July 8, 1776 . </P> <P> The Eastern Department was formed around those states that had originally sent troops to support the Siege of Boston, and in that sense it even existed before the Continental Army . This was essentially the New England department, and included the states of New Hampshire, Massachusetts (including the present state of Maine), Rhode Island, and Connecticut . For the first year of the war, the field army associated with this department, under the command of General Washington, was variously designated as the Continental Army, Grand Army, or Main Army . The Eastern Department was formally established on April 4, 1776 when the Main Army under Washington moved from Boston to New York City . Important operations in this department included the Siege of Boston in 1775--1776 and the Battle of Rhode Island in 1779 . The department was discontinued in November 1779 . </P>

Where was the headquarters for the continental army