A pact is mutual, whereas a commitment isn't necessarily so.
One can be committed to a cause, and not expect anything back from the cause, though hopes for results from the time and effort they have decided to dedicate.
On the other hand, if one makes a pact, it is usually in exchange of results. Commonly, someone might make a pact with Saint Expedite for a fast result. St Expedite's terms are typically offerings and public thanks, bringing more attention to himself, in exchange for the results.
With a commitment, a person does not potentially face ill results for breaking faith, save when oaths are made. Commitments can change: "I have decided that this other god is more aligned with my life's goals." Of course, if an oath is made, "I dedicate myself to [deity] unto the end of my days, full faith, to never be broken," it can lead to ill consequences, according to one's beliefs.
With a pact, an exchange is agreed upon for a time or a purpose to be fulfilled: "If you grant me a better job, I will make offerings of wine, pound cake, and coffee; and I will thank you on at least ten public forums, detailing your works. In private, I will burn a candle for you every night until the job is granted, and for one year after, reciting your prayer faithfully." If that pact is broken -- most often by the person, not the entity -- consequences will be had. Back to St Expedite, he is known for not only removing what benefit he provided, but removing it in such a way as to put the person into a worst situation than they were in originally.