Let $f$ and $g$ be two real smooth functions defined over $\mathbb{R}$. Suppose that at a point $x_0$ we have that $f(x_0)=g(x_0)=y_0$ and also $f'(x_0)=g'(x_0)=m$, i.e. they meet "smoothly".
My question is: is there a way to make up a third function $h$ such that $h(x_0)=y_0$, $f'(x_0)=m$, $h$ resembles (in some suitable sense) $f$ for $x\in(-\infty,x_0]$ and resembles (in the same suitable sense) $g$ for $x\in[x_0,\infty)$?
As an example, consider $f(x)=1-e^x$ and $g(x)=\ln(1-x)$, with $x_0=0$.
EDIT: In this case I'd like to end up with a function that looks like $f$ on the left of the origin and that looks like $g$ on the right: this function "forgets" about $g$ going towards $-\infty$, keeping only information about $f$, and the other way around going towards $+\infty$.
EDIT 2: I am not looking for a piecewise defined function, rather a "one piece" function