[英]Python Script for Local Repository and Cherry-Pick for specific commit GIT
我想創建一個 python 腳本來制作本地存儲庫,但我不知道如何執行此操作,在本地存儲庫之后我想為特定提交進行櫻桃挑選。 對我有什么建議嗎?
請參閱下文,了解我們用於在 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')
您可以參考這篇URL了解更多詳情
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.