Open Zylatis opened 4 years ago
Okay I might have answered my own question by changing the 2nd last line to
oid = data_repo.create_commit('HEAD', author, committer, msg, tree, [data_repo.head.target] )
but this was just based on a total hail mary looking at another part of the docs. It would be great if someone could provide an explanation of what's going on here (and i fully appreciate it might just be me not understanding git properly!)
I am trying to do something relatively simple which is just add and commit file changes to an existing repository as i would through the command line. The one complicating caveat is i am calling the code to do this from inside a submodule, however everything seems to be okay until the commit part.
In the folder above the code/submodule folder i have another which is the main git repo and which also has a folder of data i wish to monitor and commit changes of.
The code is
However when I try this i get
if i remove the 'refs/heads/master' part it works but it basically does a rebase and wipes all previous stuff which is no good either. What am I missing?