atomist-skills / skill

API to implement a JavaScript/TypeScript-based Atomist Skills
Apache License 2.0
0 stars 0 forks source link

Forcibly fetching current branch fails #222

Closed ddgenome closed 3 years ago

ddgenome commented 3 years ago

When ensuring the current branch, forcibly fetching the current branch fails:

$ git 'fetch' --force origin main:main
fatal: Refusing to fetch into current branch refs/heads/main of non-bare repository

Example skill execution: https://go.atomist.com/T29E48P34/log/4b78a8ff-0d4e-4715-aaf4-7607564ccffd/b2CSRQTJ53kEjDVAVITrZ?OnNraWxsLWZpbHRlcjo6S0hzNmJtRnRaU0FpYTJWbGNDMWhMV05vWVc1blpXeHZaeTF6YTJsc2JDSXNJRHB1WVcxbGMzQmhZMlVnSW1GMGIyMXBjM1FpZlNrPQ=

ddgenome commented 3 years ago

The --update-head-ok option may be what is needed.

https://stackoverflow.com/a/19205680/5464956