2

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?

1

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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