Baby’s surname

Does a baby have to take the fathers surname or can it have the mothers - baring in mind your not married and the relationship has been abit rocky, is it bad to give the child your surname - until marriage if that happens anyway... has anyone every done this ? X