Read Acts 19: 2-7 where disciples of John got baptized with water and had not received the Holy Spirit. When John the baptist baptized it was a baptism of repentance. When Paul explained Jesus to them, they believed in Jesus , and the verse says they were baptized in the name of the Lord Jesus. There was no ritual in this baptism. It happened when they believed. They then received the gift of the Holy Spirit. John's baptism with water was a baptism of repentance.
Acts 2: 38 Then Peter said unto them, Repent, and be baptized in the name of Jesus Christ for the remission of sins, and ye shall receive the gift of the Holy Spirit.
Notice the 3 elements of salvation. Repentance, being baptized in the name of Jesus, and receiving the gift of the Holy Spirit. Repentance is a state of being and is granted by the Father.
Acts 11: 18 When they heard these things, they held their peace and glorified God, saying, Then hath God also to the Gentiles granted repentance unto life.
Water baptism is a public declaration of repentance. When the Father grants a person repentance, they can declare it publicly, or not. He can declare his repentance publicly with water baptism, or privately to God in prayer.