Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Is there a way to specify push commits that are older than x months to remote y ? Like setting up a branch that automatically tracks master-(x months) and then push it to a separate remote?

share|improve this question

That could be rather tricky since commits aren't strictly date ordered. But, it sounds like you're not worried about exact precision. In that case, you can do something like this: Assume you want to push to the master branch on a remote named foobar from your current branch as of 6 months ago:

git push separate-remote @{6.months.ago}:master
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.