[aur-general] Can't git push, 'detached HEAD' state

Xiretza xiretza+archml at xiretza.xyz
Wed Sep 1 17:01:58 UTC 2021

On 01/09/2021 18.47, Fabio Loli via aur-general wrote:
> Hi, I can't git push in a pkgbuild I have recently adopted and don't know how to fix this.
> Logs for git clone and git push can be seen here:
> https://bin.disroot.org/?5bcc8b5042367adc#5mWdBewwCSZ3UrqvArYpe3rCfey5uEK85DJW4yxoXN8D
> https://bin.disroot.org/?da0c1f97d7791bec#DLKBzdobn82V6zs3tS1dNy692ed6CMfa2T4o4uCUD2bJ

If you have any uncommitted changes, stash or commit them. Then, from your detached HEAD state, rebase on origin/master, point the master branch to your new HEAD, switch to it, then push:

git fetch
git rebase origin/master
git branch -f master HEAD
git switch master
git push



More information about the aur-general mailing list