Open beiranvand-karim opened 2 months ago
$cmdOutput = git branch --show-current | Out-String $CurrentBranchName = [string]::join("", ($cmdOutput.Split("`n"))) $CurrentBranchIndexNumber = [int] $CurrentBranchName;
$CurrentBranchIndexNumber | ForEach-Object { $ } { git reset --soft HEAD~1; git add . git commit -m "$"; }
file name: amend.ps1
$cmdOutput = git branch --show-current | Out-String $CurrentBranchName = [string]::join("", ($cmdOutput.Split("`n"))) $CurrentBranchIndexNumber = [int] $CurrentBranchName;
$CurrentBranchIndexNumber | ForEach-Object { $ } { git reset --soft HEAD~1; git add . git commit -m "$"; }