He gives his motive when he says, "according to a revelation from God," i.e., because God revealed and commanded him to go up to Jerusalem. From this can be gathered that all the acts and movements of the apostles were according to an instinct of the Holy Spirit: "The clouds spread their light which go round about" (Job 37:11).
Then when he says, "and communicated to them," he describes the conversation. About this he does three things:
First, he mentions the subject of their conversation;
Secondly, the persons with whom he conferred;
Thirdly, the reason why he conferred with them.
The su...bject about which he conferred was the Gospel; hence he says, "I communicated to them the Gospel"; the persons with whom he conferred were the senior and more outstanding apostles; hence he says, "but apart to them who seemed to be some thing." But the reason, both useful and necessary, was "lest I should run or had run in vain."
Regarding the first, he says, "I went up to Jerusalem" where "I communicated to them," as to friends and equals, "the Gospel which I preach among the Gentiles," not in order to learn, because I had already been taught by Christ, nor in order to be reassured, because I am so certain, that if an angel were to say the contrary, I would not believe him, as is plain above (1:8). But I conferred for two reasons: namely, to show the unity of my teaching with that of the other apostles: "That you all speak the same thing and that there be no schisms among you" (1 Cor 1:10). Hence he conferred with them as one having the same word as they, and not as an adversary. Also, to avoid false accusation from others. For the Apostle had not lived with Christ or been taught by the apostles, but immediately after his conversion began to preach things odious to the Jews, especially the vocation of the Gentiles and that they should not observe the justifications of the Law. So, then, he conferred about the Gospel.
But he indicates the ones with whom he did this, when he adds, "but apart to them who seemed to be some thing." As though to say: Not with all, but with those who were of some authority and importance among them, namely, with Peter, James and John and the other great ones: "Treat with the wise and prudent" (Sir 9:21). "But apart," not to talk or treat with them about ignoble or false things, as heretics do, but because he was aware of the presence there of Jews who brought false charges against him for his teachings about the Law. Hence, in order that the truth might prevail over false charges, he spoke apart with those who would not bring false charges against him: "Treat thy cause with thy friend, and discover not the secret to a stranger" (Prov 25:9); "Before a stranger do no matter of counsel: for thou knowest not what he will bring forth" (Sir 8:21). Thus the subject of the discussion as well as the persons are made known.
Then follows the cause, which was "lest perhaps I should run or had run in vain," i.e., lest I be thought to have preached to no purpose. He calls his preaching a "running" on account of the rapidity of his teaching, for in a short time he preached the Gospel from Jerusalem to Illyricum and even as far as Spain. Hence the word of Psalm (147:15) can be said of him: "His word runneth swiftly"; "Pray, brethren, that the word of God may run and may be glorified, even as among you" (2 Thes 3:1). But did he really wonder whether he was running in vain? I answer that he did not wonder for himself, but for those to whom he had preached, because if his teaching was not firmly held by them, he would have run in vain as far as they were concerned. So he wanted to confer with them, in order that when his hearers heard that his teaching was in agreement with that of the other apostles and approved by them, they would hold to it more firmly—then he would not be running in vain with respect to them: "I therefore so run, not as at an uncertainty" (1 Cor 9:26).
Source: Commentary on Galatians