Shawn Hopkins
Shawn Hopkins

Reputation: 31

libgit2sharp only commit changes for a specific file

Is there a way to only commit the changes for a specific file using libgit2sharp? i'm looking for the equivlanent of something like, git commit -m'single file' test.txt

Upvotes: 1

Views: 311

Answers (1)

Garrick
Garrick

Reputation: 71

I believe you can stage the file or files you want to commit.

Commands.Stage(repo, files);
repo.Commit(message, author, committer);

Garrick

Upvotes: 2

Related Questions