1) Git pull
if you have any uncommitted work this only does fetch
2) Commit /
Reset if you want
3) If you really reset / commited then
4) Git pull
depending if your changes can be fast forward merged
5) if yes done -> check Team -> Show in History that you have a single history line with merge
6) no -> you need to resolve conflicts and merge
http://wiki.eclipse.org/EGit/User_Guide ... e_conflictFor the wiki
Cautions -> everything's right; fetch updated your local copy (you got the commits / history), but pull overall failed, this means it didn't get merged
10. Yes you can merge at this point, however if somone pushed something into the remote repo then you get history like
- Code: Select all
/E
A-B-D
\C/
Where C is your change and D is your merge, while E is the change in remote repository. This means you will have to merge once more anyway after a pull. Also if you push without a pull this creates a dangling commit that wont be merged automatically by git pull because the HEAD has moved to D (Same problem you had before when you 'zapped' commits).
My Pull Failed
hard reset wont vaporize your local commits however you change the commit your working on let me draw
before hard reset, * represents where you are
- Code: Select all
A-B-C-D-E (HEAD)
\F-G-H* (your local commits)
after hard reset HEAD
- Code: Select all
A-B-C-D-E* (HEAD)
\F-G-H (your local commits)
To get back to your local commits you have to use git checkout via Team-> Show in History, find your commit right click Checkout, then it looks like
- Code: Select all
A-B-C-D-E
\F-G-H* (your local commits, HEAD)
git checkout changes HEAD pointer!
http://www.kernel.org/pub/software/scm/ ... ached_head