Creating new git branch in eclipse

2019-09-05 15:17发布

问题:

Every time I try creating a new branch in eclipse, it creates it based off of the current branch. I want it to create it based off of the master.

I rt-click my overall project (pal)->team->switchTo->new branch Source->select->master

Even though I'm telling it to create it off of master, it always includes the content from the current branch, which isn't always correct.

How do I correct that, other than doing a command-line, git reset --hard HEAD? I'd like to create the branch off of master without the content from the current branch.

It looks like I'm doing it correctly, based on instructions I've seen.

Thanks, Mich

回答1:

I figured it out. I needed to pull the changes from master (remote) to the master I set to in my current project. Then I could see the up-to-date changes. Then, as suggested above, I would create a new branch.



标签: git branch