Unexpected Error while taking a Snapshot. Id:XXXXXXXXXXXXX. Message: Git push command failed. There as an error running git pushYou might receive an email with the error below when committing components. "Unexpected Error while taking a Snapshot. Id:XXXXXXXXXXXXX. Message: Git push command failed. There as an error running git push"
This basically means that when you were trying to commit into the branch linked to that Git Snapshot, another person has pushed to the same branch as you and Git was not be able to push your changes.
This information is returned by Git in our logs for the commit that returned the error: error: failed to push some refs hint: Updates were rejected because the remote contains work that you do hint: not have locally. This is usually caused by another repository pushing hint: to the same ref. You may want to first integrate the remote changes hint: (e.g., 'git pull ...') before pushing again. hint: See the 'Note about fast-forwards' in 'git push --help' for details. When this kind of issue happens, you must wait for the other action to finish and commit again. The commit is usually saved in Copado with status Pending what means that it wasn't completed successful.
Since Copado v9 you can see, when doing the commit, if someone else is committing in the same branch. A Copado notification is displayed in the screen.
If you see the warning in the screen, wait for that action to finish before committing to avoid this kind of issues.
More information in the documentation below: https://docs.copa.do/article/3T5whAwtp2-blocked-branches-and-queue-jobs