Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EGit / JGit » JGit orphan branch checkout
JGit orphan branch checkout [message #1842652] Sat, 26 June 2021 23:23
Mike Limansky is currently offline Mike LimanskyFriend
Messages: 1
Registered: June 2021
Junior Member
Hello,

I've tried to use CheckoutCommand to create orphan branch, and found that the still has a parent. As I see from the Javadocs and sources, the startCommit have to be defined (or current HEAD is used). This is really different from `git checkout --orphan` which creates branch detached from current history. I tried to set empty start point (.setStartPoint(walk.parseCommit(ObjectId.zeroId()))) but It fails, because zero commit is not resolved.

Could anybody please clarify if it possible to achieve behavior same with git checkout --detach using JGit API?
Previous Topic:JGit checkout below project root
Next Topic:Having Not Responding messages while using Git Staging view
Goto Forum:
  


Current Time: Mon Sep 20 18:31:14 GMT 2021

Powered by FUDForum. Page generated in 0.01759 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top