简体   繁体   中英

git: cherry-pick in bare repo

My server-side bare git repo needs to periodically cherry-pick commits from a special branch onto master (executed from a hook).

Is there any way to avoid a checkout and do this directly in the bare repo?

Edit: Since the cherry-picking procedure is non-interactive, it is okay to completely error out if the cherry-pick isn't trivial to apply.

Current solution is for the hook to make a temporary shallow checkout, perform the cherry-pick there, push back to the bare repo, and (possibly) remove the temporary checkout.

I'll accept a different answer if there is a way to do this without a temporary checkout.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM