I have a stage at the end of my pipeline job which has to push changes back to a particular Gitlab branch. After trying out several solutions proposed on stackoverflow, I am still not able to push to the branch
sh("git add .")
sh("git commit -a -m ' New changes'")
sh('git push https://${GIT_USERNAME}:${GIT_PASSWORD}@<REPO> ')
I expected it to be pushed to the branch which it checked out from but I get the following result on the console
- git commit -a -m ' New changes' [detached HEAD bc78567] New changes
- Everything up-to-date
any reason for this issue?