Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

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
add comment

1 Answer

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
add comment

Your Answer

 
discard

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.