Skip to main content



      Home
Home » Eclipse Projects » EGit / JGit » JGit Committing Into a specific branch
JGit Committing Into a specific branch [message #903367] Thu, 23 August 2012 07:25 Go to next message
Eclipse UserFriend
Hi

I am working on a project and need help. I am using JGit for my version control system.

Basically, I can create branches.

What I would like to do is, once I have created the branch I would like to commit into the same branch each time. Is there a way of doing this through JGit?
Re: JGit Committing Into a specific branch [message #903379 is a reply to message #903367] Thu, 23 August 2012 08:37 Go to previous messageGo to next message
Eclipse UserFriend
Just to add to this:

Each time I return the branch name it returns master. As soon as I change view in the GUI, and when I execute the code again the return branch name is the 1 I created. So is there any way of setting branch name as the default?
Re: JGit Committing Into a specific branch [message #903402 is a reply to message #903379] Thu, 23 August 2012 09:47 Go to previous messageGo to next message
Eclipse UserFriend
With Git the commit command is always acting on the currently checked out local branch.
So if you want to commit to a different branch you first need to checkout this other branch.
Re: JGit Committing Into a specific branch [message #903406 is a reply to message #903402] Thu, 23 August 2012 10:02 Go to previous message
Eclipse UserFriend
I actually figured this out, but thanks for your help.
Previous Topic:Remote Tracking autoupdate does'nt work - feature or bug?
Next Topic:remote git init failed?
Goto Forum:
  


Current Time: Fri Jul 04 18:49:54 EDT 2025

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

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

Back to the top