-
Bug
-
Resolution: Unresolved
-
Critical
-
None
I'm using Gitea and Jenkins 2.356. I just installed blue ocean and created my first pipeline. I have a master branch with nothing in it other than the initial readme and a develop branch that I have been coding in, with 5 or 6 commits. None of it's ready enough to go to master, and I was installing jenkins to start ci/cd to the test location.
So, when blue ocean wanted to commit the jenkinsfile, my choices were master or a new branch. I understood that "develop" wasn't new, but typed it anyway. Since there wasn't an option for any existing branch, I thought it should either fail because the branch exists, or use the existing branch.
Nope, it completely ovewrote the branch, wiping all of the code as far as I can tell. I don't actually know what the underlying sequence is, because I don't even know git that well (day-to-day, I'm in a microsoft shop running tfs on an azure devops server, so linux open-source and git are all fairly recent at-home hobby stuff). I don't know if it issued a standard command to gitea and gitea should have failed, or if jenkins actively deleted the existing branch and then created the new one or gave it some no-prompt option that prevented gitea from throwing a warning, or if maybe both branches really exist, but jenkins gave some command that forced gitea to create a new branch with the same name, hiding the commits, or what.
As a corrollary, if the original commits are just somehow hidden, does anyone know how to get them back?