I picked a side I identified with and chose to fight. It was never going to be ideal, but of course I'd try avoiding killing the folks with whom I share a faith. That means more to me than my country.
How can you possibly know whose side G-d is on in a made-up war? What's your straightforward answer to the OP question?
In ancient Israel, you would have fought on God's side because you would have been protecting something that was God given....your land. Israel was not in an offensive war but a defensive one and God demonstrated that when he was backing his nation, they could not lose....however when Israel sough to ally itself politically with other nations, God withdrew his backing and they were defeated. We see modern day Israel in this situation.....spilling innocent blood, and allying itself with nations whose worship they despise. (Isaiah 1:15)
When giving Abraham strong assurance that the divine promise would be fulfilled upon his descendants, God said to him:
“You may know for sure that your seed will become an alien resident in a land not theirs, and they will have to serve them, and these will certainly afflict them for four hundred years. But the nation that they will serve I am judging, and after that they will go out with many goods. As for you, you will go to your forefathers in peace; you will be buried at a good old age. But in the fourth generation they will return here, because the error of the Amorites has not yet come to completion.” (Genesis 15:13-16)
This was speaking about their time in Egypt....over 400 years they would labor there before God released them.
The taking over of the land by the natural seed of Abraham would have to wait for a particular situation to occur.
This long period of time would allow for the chosen natural seed of Abraham to grow to a people of many members, numerous enough to displace the Amorite occupants of the land of Canaan who were going from bad to worse in the “error” of their pagan ways. Although Abraham’s natural seed would grow to a people of great size in a land foreign to the land of Canaan, yet God would hold the land in reserve for them until the “error” of the promised land’s inhabitants had become so bad that they deserved to be purged out of the land. That God would give the territory to Abraham’s natural seed at the time ripe for it, Jehovah then guaranteed that with a formal covenant. God backed them when any other nation tried to take it away from them. There you have "sanctioned" warfare.
Now, coming to the present day wars of the nations, how many are living in lands that are God-given?
How many are conquerors of the land they now occupy and who have displaced the original inhabitants and treated them as second class citizens in their own country? Did they have God's sanction to occupy these lands that were not their own, even when an enemy threatened them?
Jesus demonstrated that his disciples were to be no part of the political world or its conflicts. The situation in Rome at the time he walked the earth, saw the Jewish zealots were plotting to overthrow their oppressors. But Jesus did not side with them, saying that his Kingdom was "no part of this world". (John 18:36) He did not promote violence in any way, rather he taught his disciples to "love their enemies" and to "pray" for them. (Matthew 5:43-44)
So if there is no sanction from God in any conflict, the truth is, that God is not on either side.....he is on the side of those who "learn war no more". (Isaiah 2:2-4) I believe that his people were in jail as conscientious objectors.