-
Apparently, if you filter a GitHub action by tag, what you get is something similar to what happens in pull requests: the repo is in a detached head state and then you can’t commit and push there. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
If the tagged commit is on the master branch, you can then |
Beta Was this translation helpful? Give feedback.
-
Simran-B:
I think you mean 0? 1 is the default, 0 is used for „get everything“. |
Beta Was this translation helpful? Give feedback.
actions/checkout@v2
does a shallow clone by default, so the history will be grafted and no remote branches will be available. You need to set thefetch-depth
option to 0 to get the full history and the branches. Thengit checkout master
should work.If the tagged commit is on the master branch, you can then
git reset --hard <tag>
. Or you could dogit checkout <tag> -B master
to checkout the tag as a new branch “master”, overwriting (!) the existing local branch. But I’m not sure if that is what you want to do.