This question is kind of suggested by the question Is the category of group objects in an $(\infty,1)$-topos reflective as a subcategory of the groupoid objects?
Question: If $\mathcal C$ in an $(\infty,1)$ topos, is the functor from groupoid objects internal to $\mathcal C$ to $\mathcal C$ given by the objects in some sense both a fibration and a cofibration? I expect for the latter one needs some kind of natural number object.
In the case of sets, the cofibration property gives for a groupoid $G$ and a function $f: Ob(G) \to Y$ a new groupoid say $f_*(G)$ with object set $Y$ and the appropriate universal property: see Higgins' book Categories and Groupoids. The topological application is the effect on the fundamental groupoid $\pi_1(X,X_0)$ of vertex identifications of a CW-complex $X$.
In particular, if $Y$ is a singleton, we get a group from a groupoid. One can make this construction include free groups and free products of groups.