The early Christians had extremely strong and extremely diverse opinions on whether or not Christians should fight. Both St. John the Baptist and Jesus expressed approval of individual soldiers’ service, as long as they did their job fairly; and obviously centurions were important early followers of Jesus in the Gospels and Acts. This followed on from Old Testament tradition, because obviously being “the Lord of Hosts” and leading Israel into battle are not very pacifist.
However, it’s also always been clear in the OT and NT that God would prefer that everybody be at peace under His rule, and that just because He permits people to defend themselves now, that doesn’t mean fighting is totally okay and the way He meant it to be. Both the OT and NT are very clear that when the Lord comes to judge everyone, peace will descend upon all things, from the animal kingdom to all the peoples of the world.
So just as not everyone is called to wander the roads as an evangelist with no money and only one set of clothes, but some people clearly are; and not everyone is called to live celibate like he’s already in Heaven where there’s no marriage, but some people are; so not everyone is called to live the way we will live after the Judgment, but some people choose to make themselves a sign of that.
Strictly speaking, though, that’s not being a pacifist. “Pacifist” originally came from a word meaning “someone who makes peace among others” – a “peacemaker”, a reconciler. It has come to mean someone who instead is an activist against making war or defending oneself. Strictly speaking, someone who refuses to fight would be a “peaceable” person or a person sworn not to bear arms, not a peacemaker or a peace activist. So pacifist is kind of a misleading term.
Back to the point…
So there was disagreement among early Christians about the suitability of military service. Service in the Roman military included a great deal of pagan worship of the goddess Roma and perhaps the Legion’s own insignia/standard. (Although Christians were often allowed to get out of it, or found a way to be doing something else on days of Legion ceremony.) It rendered one unable to legally wed any woman during the twenty years you had to serve in the Legions (although you could marry in the Church, no problem); it made it hard to go to Mass when on campaign; and it exposed one to immoral practices (like looting, gambling, fast women, bad stuff in camp life, etc.)
However, Christianity apparently had already spread throughout the Legions and other Roman military forces, because all those centurion guys apparently were not shy about spreading their faith. A lot of Christian centurions apparently tried to get other Christians in their units, because fairly soon we hear of all-Christian or mostly-Christian military units all over the place. People like Justin Martyr were glad to talk about their heroic deeds in war. Whenever the Roman world cracked down on Christianity, individual military Christians (and on one occasion, a fairly large unit) were martyred just as bravely, with typical Roman Army stoicism and jokes. We know that plenty of Army guys were buried in Christian catacombs as Christians. There were plenty of 'em.
Now, the major issue was clergy. If you were a bishop, or later, a priest, you were definitely supposed to keep your hands clean of violence, because you had to serve Mass with those hands. (And Church history is full of different ideas about what this principle meant.) Monks and hermits generally didn’t want to do anything violent, either; so a guy who wanted to be a monk usually would soon want out of the Legions.
This became a problem after a while, because modern Romans of the Empire mostly didn’t want to serve twenty years in the Legion. (By then they weren’t desperate to get off the boring farm, because slaves did most of the farming by then. They could stay home in the slums and live decently off imperial bread and circuses welfare. And if they came from merchant families or wealthy families, they had better things to do with their lives. The only reason to join up was to get elected to imperial offices, and you didn’t need to serve in the army anymore for that, at least a lot of the time.) So by the time we were a couple centuries past Jesus, the emperors started passing laws that said anybody whose dad had served in the Legions also had to serve in the Legions, no matter what career they’d prefer. This was why a lot of guys like St. Martin of Tours made a big point of refusing to bear arms in the military; they were protesting against not being allowed to get out of the Legions even to pursue their exciting careers of prayer, fasting, celibacy, and owning nothing.
(And obviously when monasteries were invented, even though monasteries were full of young men of the right age, the Church always kind of objected to them getting drafted.)
So basically… the Church generally didn’t object to people serving in the military, or to wars per se, because of the precedent of Israel. But when the Church was in a position to advise emperors and kings and other governments, it tended to advise peaceful positions, because (if nobody is trying to kill you) peace is better than war. And if you have to fight, you’re supposed to fight in a just manner for just reasons, not just run around raping and pillaging.