Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<blockquote> <p>From what I understand if you create a branch of a local repository, select that branch in elcipse &amp; then make changes to the code. You should then be able to select the original master branch &amp; you wouldn't then see those changes provided you hadn't merged.</p> <p>What's confusing me is that when I switch back to the master the changes I made in the new branch are in there...even though I haven't merged.</p> </blockquote> <p>You didn't explicitly say this, but my guess is that you didn't <em>commit</em> those changes. Git will happily let you switch between branches with uncommitted changes - as long as those changes aren't in any files which differ between the two branches. The big thing that this helps with is when you're about to commit and discover you have the wrong branch checked out.</p> <p>If you committed your changes, then switched branches, you'd see them disappear exactly as you expect. </p> <p>(And merges, by the way, are commit-based operations - you merge two (generally) commits and create a new commit with both of the original two as parents. It makes no sense to think about merging with uncommitted changes.)</p> <p>With respect to learning to use, and more importantly <em>understanding</em> Git, there are a lot of great references out there - for example the <a href="http://tom.preston-werner.com/2009/05/19/the-git-parable.html" rel="nofollow">Git Parable</a> (lighthearted introduction to the core ideas), <a href="http://progit.org/book/" rel="nofollow">ProGit</a> and the <a href="http://book.git-scm.com/" rel="nofollow">Git Community Book</a>. EGit is a great thing in principle, making things accessible through an IDE - but I'd caution you not to skip over a good understanding of how things are really working under the hood. It'll probably save you someday from clicking on a button then saying "oh no, what have I done!"</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload