私はPythonGitが初めてで、プルとプッシュに問題があります。ローカルにベア リポジトリを作成し、それに最初のコミットをプッシュしました。その後、PythonGit を使用して新しいユーザー リポジトリを初期化し、フェッチしてプルしようとしました。リポジトリの初期化に問題はありませんが、リモート/ベア リポジトリからは何も取得できません。私のコード:
import git
repo = git.Repo.init('.')
origin = repo.create_remote('origin', '/home/paweber/git/my-repo.git')
origin.fetch()
repo.create_head('master', origin.refs.master).set_tracking_branch(origin.refs.master)
origin.pull()
フェッチとプルの ipython コンソールで次のように取得します。
In [5]: origin.fetch()
Out[5]: [<git.remote.FetchInfo at 0x7f4a4d6ee630>]
フェッチと
In [6]: origin.pull()
Out[6]: [<git.remote.FetchInfo at 0x7f4a4d6e6ee8>]
プル用。プル アクションの後、何もプルされず、レポはまだ空ですが存在します。私が間違っていることは何ですか?