Skip to content

Commit

Permalink
Clear staging area before initializing branch (#33)
Browse files Browse the repository at this point in the history
  • Loading branch information
amousavigourabi authored Aug 17, 2023
2 parents 4304463 + 250eba8 commit 2d33445
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ runs:
- name: 'Commit and push the changed files'
run: |
sudo ${{ github.action_path }}/setup-branch.sh ${{ inputs.branch }}
git stage -A ${{ inputs.files }}
sudo git stage -A ${{ inputs.files }}
sudo ${{ github.action_path }}/commit.sh "${{ inputs.message }}" ${{ inputs.allow-empty }}
sudo ${{ github.action_path }}/push.sh ${{ inputs.branch }}
shell: bash
1 change: 1 addition & 0 deletions setup-branch.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ then
git switch $1
else
git switch --orphan $1
git rm --cached -r .
git commit --allow-empty -m "Initialize branch"
fi
git merge --squash --strategy-option=theirs --allow-unrelated-histories $work_branch
Expand Down

0 comments on commit 2d33445

Please sign in to comment.