Merge pull request #52 from thecesrom/fix/undo-initial-commit-printf-success

fix: `printf` command when undoing initial commit
This commit is contained in:
Bhupesh Varshney 2022-08-29 11:23:28 +05:30 committed by GitHub
commit cd5960b2f4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

2
ugit
View file

@ -64,7 +64,7 @@ undo_git_commit() {
# This will not delete the files from your working directory
if [[ "$last_commit" == "$initial_commit" ]]; then
if git update-ref -d HEAD && git rm --cached -rf . > /dev/null 2>&1; then
printf "%s\nInitial commit: $initial_commit successfully undone. Commit state is clean."
printf "%s\n" "Initial commit: $initial_commit successfully undone. Commit state is clean."
else
perror "Error: Failed to revert initial commit"
exit