Hopefully means with hope, or if all goes well. Hopefully it will rain, travel hopefully, wait hopefully.
The second sense — hopefully we'll be there by six — was fought over bitterly for decades, on the grounds that nobody is doing the hoping. That objection has quietly lost, since frankly and clearly work the same way. Note the older sense, in a hopeful manner.
1adverbhopefullyIf all goes well.
“Hopefully the rain will stop before the match starts.”
2adverbmannerIn a hopeful manner.
“The dog looked up hopefully at the table, waiting for a scrap of food.”
hopefully is a manner, or a comment.
Hope plus -fully. The sentence use is recorded from the eighteenth century and spread in America, possibly from German hoffentlich.
German
hoffentlich
English, today
hopefully
From hopeful + -ly. The use as a sentence adverb first gained currency in the United States and has been explained as a possible German hoffentlich.
Etymology from Wiktionary, CC BY-SA