Skip to content
Advertisement

Tag: checkout

Jgit – checkout from a specific branch

I am using jgit. I want to create and checkout a new branch. I have seen the git.checkout.createnewbranch command. Is there a way to specify the base branch for the checkout, say “test” (or) we have to checkout,pull “test” first and then checkout/create the new branch from it? Answer Yes, it’s possible: Don’t forget to call git.close() or use try-with-resources

Advertisement