This is the code I am using currently. It deletes the contents of the file and replaces it with the new content.
var readfile = client.Repository.Content.GetAllContentsByRef(owner, repo, targetFile, branch).Result;
var updatefile =client.Repository.Content.UpdateFile(owner,repo,targetFile,
new UpdateFileRequest("API File update", "Added this new line new ", readfile.First().Sha, branch));
I want the content to be added to the file. Not replace it. Is there a fault in my code?