git revert -m 1 <merge-commit>
With ‘-m 1’ we tell git to revert to the first parent of the mergecommit on the master branch. -m 2 would specify to revert to the first parent on the develop branch where the merge came from initially
(lieber vorher prüfen welcher branch welcher ist)
/**
* Called when a null model is about to be retrieved in order to allow a subclass to provide an
* initial model.
* <p>
* By default this implementation looks components in the parent chain owning a
* {@link IComponentInheritedModel} to provide a model for this component via
* {@link IComponentInheritedModel#wrapOnInheritance(Component)}.
* <p>
* For example a {@link FormComponent} has the opportunity to instantiate a model on the fly
* using its {@code id} and the containing {@link Form}'s model, if the form holds a
* {@link CompoundPropertyModel}.
*
* @return The model
*/
protected IModel<?> initModel()
{
IModel<?> foundModel = null;
// Search parents for IComponentInheritedModel (i.e. CompoundPropertyModel)
for (Component current = getParent(); current != null; current = current.getParent())
{
// Get model
// Don't call the getModel() that could initialize many in between
// completely useless models.
// IModel model = current.getDefaultModel();
IModel<?> model = current.getModelImpl();
if (model instanceof IWrapModel && !(model instanceof IComponentInheritedModel))
{
model = ((IWrapModel<?>)model).getWrappedModel();
}
if (model instanceof IComponentInheritedModel)
{
// return the shared inherited
foundModel = ((IComponentInheritedModel<?>)model).wrapOnInheritance(this);
setFlag(FLAG_INHERITABLE_MODEL, true);
break;
}
}
// No model for this component!
return foundModel;
}
ref~ is shorthand for ref~1 and means the commit's first parent. ref~2 means the commit's first parent's first parent. ref~3 means the commit's first parent's first parent's first parent. And so on.
ref^ is shorthand for ref^1 and means the commit's first parent. But where the two differ is that ref^2 means the commit's second parent (remember, commits can have two parents when they are a merge).