using NGit; using NGit.Api; // Adding a single file to the Git repository Git git = Git.Open("c:\repository"); git.Add().AddFilepattern("file.txt").Call(); // Adding multiple files to the Git repository git = Git.Open("c:\repository"); git.Add().AddFilepattern(".").Call();In the first example, a single file called "file.txt" is added to the Git repository. In the second example, all files in the directory are added to the Git repository. The package library for NGit.Api Git Add is NGit, which is a Git implementation for Java and .NET.