For example, if using git SCM, choose Git Publisher in post build step.

Git Publisher Configuration