Well first the passage in Acts 10:47 is about keeping the command to be water baptized in the name of the Lord.
Peter stated in Acts 10:43 that whoever
believes in Him will receive remission of sins. These Gentiles believed in Him, received the gift of the Holy Spirit and spoke in tongues BEFORE water baptism (Acts 10:43-47). In Acts 11:17, we read they received the
same gift (Holy Spirit) WHEN THEY BELIEVED ON THE LORD JESUS CHRIST (compare with Acts 16:31) and this was established BEFORE water baptism. Peter referred to this as
repentance unto life (vs. 18).
The reason those who are being mentioned here had received the Holy Spirit before the water baptism was because the Apostles/Jewish disciples were arguing among themselves on rather the Gentiles should be allowed to receive the gift of salvation through faith in Christ just as them.
This is why they spoke in tongues to demonstrate that they have received the gift of the Holy Spirit and that God has accepted these Gentiles into the body of Christ BEFORE water baptism.
The Lord baptized them with the Holy Spirit to show those who were in disagreement that Gentiles do have the right to salvation to.
Yet they
believed in Him, received the gift of the Holy Spirit and
spoke in tongues and
were saved BEFORE water baptism.
This is not the standard though on how the Holy Spirit is received as Apostle Peter shows the order in which one is to take to receive the Holy Spirit in Acts 2:38.
Do you attend the church of Christ? In Acts 2:38, "for the remission of sins" does not refer back to both clauses, "you all repent" and "each one of you be baptized," but refers only to the first. Peter is saying "repent unto the remission of your sins," the same as in Acts 3:19. The clause "each one of you be baptized" is parenthetical. If your argument is true, then it should be consistently taught throughout scripture. Right? Yet, that is not the case as I will show you.
Acts 3:19 -
Repent therefore and
be converted, that your
sins may be blotted out, so that times of refreshing may come from the presence of the Lord. *What happened to baptism?
Acts 10:43 - To Him all the prophets witness that, through His name, whoever
believes in Him will receive remission of sins. 44 While Peter was still speaking these words, the Holy Spirit fell upon all those who heard the word. 45 And those of the circumcision who believed were astonished, as many as came with Peter, because
the gift of the Holy Spirit (compare with Acts 2:38 -
the gift of the Holy Spirit) had been poured out on the Gentiles also. 46 For they heard them
speak with tongues and magnify God. Then Peter answered, 47 "Can
anyone forbid water, that
these should not be baptized who
have received the Holy Spirit just as we have?" *What happened to baptism in verse 43?
Acts 11:17 - If therefore God gave them the
same gift as He gave us
when we believed on the Lord Jesus Christ, (compare with Acts 16:31 -
Believe on the Lord Jesus Christ and you will be saved - which was established BEFORE water baptism) who was I that I could withstand God?" 18 When they heard these things they became silent; and they glorified God, saying, "Then God has also granted to the Gentiles
repentance unto life. *What happened to baptism?
Acts 15:8 - So God, who knows the heart, acknowledged them by
giving them the Holy Spirit, just as He did to us, 9 and made
no distinction between us and them,
purifying their hearts by faith. *What happened to baptism?
Faith in Jesus Christ "implied in genuine repentance" (rather than water baptism) brings the remission of sins and the gift of the Holy Spirit (Acts 2:38; 3:19; 10:43-47; 11:17,18; 15:8,9; 16:31). *Perfect Harmony*
*Also notice in Ephesians 1:13 - In Him, you also, after listening to the message of truth, the
gospel of your salvation - having also
believed, you were
sealed in Him with the Holy Spirit of promise. *What happened to baptism?
There he clearly says after faith has been established from hearing the word, then we are to repent of our sins and get baptized (H2O) in His name, then we will receive the Holy Spirit.
Wait minute, faith first established then "after" that repent to receive the remission of sins? We actually repent before saving faith in Christ is established. Matthew 21:32 - For John came to you to show you the way of righteousness, and you
did not believe him, (faith not established before repentance) but the tax collectors and the prostitutes did. And even after you saw this, you did not
repent and believe him. *Now faith is established after repentance. Mark 1:15 -
Repent and believe the gospel. *Notice the order. It's not believe the gospel then afterwards repent. Acts 20:21 - testifying both to Jews and to Greeks of
repentance toward God and of faith in our Lord Jesus Christ. *Notice the order.
In Acts 2:36-37, their faith/belief at that point was only "mental assent" that Jesus was the Messiah and that they were guilty of crucifying Him. Saving faith was not established yet. They still needed to trust exclusively in Christ for salvation and this is why they still needed to repent and believe the gospel/believe on the Lord Jesus Christ to be saved. Baptism symbolizes what repentance/faith secures. The remission of sins is signified, yet not procured in the waters of baptism.
Notice how Acts 5:32 says the Holy Spirit is given to those who obey, obey what you may ask, well Peter gives us the answer there in Acts 2:38 of repenting and getting baptized.
Those who repent and believe the gospel have obeyed Him. Choosing to believe the gospel is the act of obedience that saves. Romans 10:16 - But they have not all
obeyed the gospel. For Isaiah says, "Lord, who has
believed our report?" Romans 1:16 - For I am not ashamed of the gospel of Christ for it is the
power of God unto salvation to everyone who
believes. Getting water baptized "after we have been saved through faith" is an act of obedience, a work (along with other works of righteousness which are also acts of obedience that FOLLOW saving faith in Christ BUT we are not saved by works of righteousness which we have done - Titus 3:5).