In Genesis 50:15-21 we see a good example of how to repent of our sins and actions toward man and/or toward God. Josephs brothers had been grieved by their actions done many years earlier of selling Joseph into slavery in order to get rid of him. They had been jealous and resentful of him because their father Jacob favored Joseph over them.
In Genesis 50:17 the brothers and Joseph are living in Egypt because of a severe famine in Canaan. Joseph had been promoted by Pharaoh to being second in command in Egypt. Jacob had died and the brothers were fearful that Joseph would now exact his revenge on them and perhaps their families because of what they had done to him.
In their repentance toward Joseph they acknowledged their sinful actions. They confessed that they had done evil. They asked for forgiveness. They reminded Joseph of their long born sorrow and grief. They went to Joseph and fell down and submitted themselves to him as his servants to try and make up for what they had done to him.
Joseph’s reaction is just and right. He weeps for the repentance that he sees in his brothers. He reassures his brothers that he has no ill intent toward them or their families. He comforts them, and assures them, and speaks kindly toward them the scripture says.
The Bible says that when we sin we also can repent and ask forgiveness of God. We are to acknowledge our sin before God and submit ourselves to him. The Bible says that God is just to forgive our sins and to cleanse us from all unrighteousness.