1 Brothers and sisters, if someone is caught in a sin, you who live by the Spirit should restore that person gently. But watch yourselves, or you also may be tempted. 2 Carry each other’s burdens, and in this way you will fulfill the law of Christ. 3 If anyone thinks they are something when they are not, they deceive themselves. 4 Each one should test their own actions. Then they can take pride in themselves alone, without comparing themselves to someone else, 5 for each one should carry their own load. 6 Nevertheless, the one who receives instruction in the word should share all good things with their instructor.
7 Do not be deceived: God cannot be mocked. A man reaps what he sows. 8 Whoever sows to please their flesh, from the flesh will reap destruction; whoever sows to please the Spirit, from the Spirit will reap eternal life. 9 Let us not become weary in doing good, for at the proper time we will reap a harvest if we do not give up. 10 Therefore, as we have opportunity, let us do good to all people, especially to those who belong to the family of believers. (NIV)
In this section Paul finishes the body of the letter. The closing exhortation builds off of the last section, specifically the call to live by the Spirit and exhibit its fruit. Martyn has a diagram that shows the specifics on p. 543, which I'll summarize (since you can no longer insert Excel tables into blogger). Vs. 1 calls for gentleness, vs. 2 for patience, vv. 4-5 for self-control, and vs. 6 for generosity.
If the community possesses the Spirit then it will exhibit the fruit of the Spirit. But what do they do when a member fails to live up to that standard? The law had an answer for that. The Torah not only shaped identity it also stipulated punishments for failure to keep it. How should a community dependent on the Spirit react? Paul answers by telling them to live out that fruit in the way they deal with erring members. Be gentle and have self-control. The goal isn't to punish, but to restore. Have patience with one another. Working out issues of sin takes time. The community must come together and help each other strive to be holy.
Rather than excluding one another Paul calls for the Galatians to bear each other's burdens. Listen to each other, fast and pray for each other, encourage each other, keep each other accountable. Paul makes the community responsible for the growth in holiness of each individual member. Through that costly ministry the law of Christ is fulfilled.
Paul can foresee a potential problem happening, though. When there's this much contact between people there's an opportunity for pride to creep in. Paul commands that no such thing be done (is this perhaps a veiled shot at the Teachers who may have been boastful of their righteousness as Torah observant Jews a la Wisdom of Solomon?). Each person has enough to worry about just keeping track of themselves. Each person is judged on the basis of their own works (the Bible is univocal that judgment is on the basis of works).
While each person is responsible for themselves on judgment day, Paul reiterates that the community is responsible for its own. This time he focuses on support of those who teach. Even from the earliest times teachers were held in highest regard. A generous gift or payment by the congregation was seen as both natural and compulsory.
Verses 7-10 wrap up this section in an interesting way. Paul reaffirms the call to follow the Spirit as the sole guide for Christian life. Sowing in the Spirit yields life, meaning it produces the good works that will result in passing the final judgment. Sowing in the law yields death as it does not produce the fruit that are necessary. It cannot adequately restrain one from committing sins of the flesh. Thus, Paul urges the Galatians on in doing good, that is in walking in the Spirit, for the benefit of all around them, especially the community of faith.
 There is clearly an element of unexpectedness present in the being 'caught.' The question of whether the person accidentally fell into the sin (sin caught the person) or a person was surprisingly caught sinning (his being caught by the community). It's difficult to decide between the two, as either would fit the context, though I think the latter fits ever so slightly better. Hidden sin coming to light would be a bigger issue for the community to deal with and be more necessary for Paul to address.