Closed eugene-bright closed 2 years ago
Thanks for reporting.
This is a known edge case of the Action:
The following is a list of edge cases the Action knowingly does not support: No git pull when the repository is out of the date with remote. The Action will not do a git pull before doing the git push. You are responsible for keeping the repository up to date in your Workflow runs.
I don't have any plans on adding options to "fix" this. User will have different preferences to either use git rebase
or git merge
. There will be merge conflicts that need to be handled. The list goes on. :)
I suggest adding a new step to your workflows to always run git pull
before attempting to create the commit
- name: Pull Remote Changes
run: git pull
I hope that solves your particular problem.
I keep a list of features to be added to the next major version. git-pull
is on the list.
Is your feature request related to a problem? Please describe. Force pushing is not safe. New commits that came in the window before workflow start and force push will be lost
Describe the solution you'd like We can try to perform pull before pushing to make it more successful and safer