diff --git a/SourceGit/Git/Repository.cs b/SourceGit/Git/Repository.cs index 223dbdf2..9df6827c 100644 --- a/SourceGit/Git/Repository.cs +++ b/SourceGit/Git/Repository.cs @@ -686,7 +686,7 @@ namespace SourceGit.Git { public bool DoCommit(string message, bool amend) { isWatcherDisabled = true; - var file = System.IO.Path.Combine(Path, ".git", "COMMITMESSAGE"); + var file = System.IO.Path.GetTempFileName(); File.WriteAllText(file, message); var args = $"commit --file=\"{file}\"";