What is the origin of "dog sitting"?

Dog-sit (dog sitter, dog sitting), as well as house sitting are derived from the 20th Century word babysitting.

BABY-SITTER - noun "someone who looks after a child while its parents are out, especially in the evening. Originally US. The derived verb 'baby-sit' is first recorded in 1947. By the 1960s 'sit' was being used on its own with the same meaning, and later in the century it began to attach itself to other objects of guardianship (mainly in 'house-sit')." From "20th Century Words: The Story of New Words in English Over the Last 100 Years" by John Ayto (Oxford University Press, New York, 1999).

Source

This begs the question (hat tip to @nnnnnn) of the etymology of babysitter. An excellent answer is may be found at this question (hat tip to @Bitterdreggs).

Here is a salient quote from that question from Wikipedia:

The term "baby sitter" first appeared in 1937, while the verb form "baby-sit" was first recorded in 1947. The American Heritage College Dictionary notes "One normally would expect the agent noun babysitter with its -er suffix to come from the verb baby-sit, as diver comes from dive, but in fact babysitter is first recorded in 1937, ten years earlier than the first appearance of baby-sit. Thus the verb was derived from the agent noun rather than the other way around, and represents a good example of back-formation. The use of the word "sit" to refer to a person tending to a child is recorded from 1800. The term may have originated from the action of the caretaker "sitting on" the baby in one room, while the parents were entertaining or busy in another. It's also theorized that the term may come from hens "sitting" on their eggs, thus "caring for" their chicks.

Thus a dog sitter is a back formation of a baby sitter, namely one who is a caretaker for the dog or the baby.