Skip to content

Commit

Permalink
fix: commit only staged files
Browse files Browse the repository at this point in the history
close #253
  • Loading branch information
Vinzent03 committed Jul 16, 2022
1 parent f90b284 commit f71fdf5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -426,7 +426,7 @@ export default class ObsidianGit extends Plugin {
} else {
status = await this.gitManager.status();
}
const changedFiles = status.changed;
const changedFiles = status.changed; + status.staged;

if (changedFiles.length !== 0) {
let commitMessage = fromAutoBackup ? this.settings.autoCommitMessage : this.settings.commitMessage;
Expand Down

0 comments on commit f71fdf5

Please sign in to comment.