I am running automation tests on LambdaTest from Jenkins and trying to push code to my GitHub repo. How can I create a new branch?

I am running automation test on LambdaTest from Jenkins and I am trying to push some code to my Github repo. I wanted to know how I can create a new branch and switch to that branch. A little help will be really appreciated.

Hello Dipen-Soni,

You can create and switch to the new branch using the below code:


$ git branch -f <new-branch>
$ git switch <new-branch>