I want to create a python script for making local repository and I have no idea how to do this, after local repository I want to do cherry-pick for specific commit. Any tips for me?
Refer to below for what we have used to create a repo and some actions in Python:
repo = git.Repo(os.path.abspath(repo_path))
repo.git.checkout(branch)
repo.git.checkout(commit_hash)
repo.git.checkout(tag_name)
repo.git.cherry_pick('fff1234')
You can refer to this URL for more details https://titanwolf.org/Network/Articles/Article?AID=0f484197-1dc3-4676-82c8-5359fad01f33#gsc.tab=0
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.