i created a new branch A to do some work from master and did some work and did a local commit.
Then i created a branch B to do some work from master and did some work and committed it. Then i merged it to master and did push to upstream on master.
now i switched back to branch A. So to get the latest changes merged which option should i use in egit? fetch from upstream or pull ?
and what is the difference?
I dont want to chose randomly as i dont want to overwrite the changes...
fetch from upstream
does not overwrite anything in the working tree. But pull
will, but it will not completely destory work, it will create a conflict to manually merge if it can not do it automatically.
I suggest if you are unsure, ensure you working tree is clean, and everything commited. Note down the current commit-id.
Now you can do what you want and if it does wrong, you just clean you tree (by deleting stuff if needed). Then ask it to checkout the commit-id you noted. Now you are back where you were.
commit-id's are (generally) always reachable. Meaning you can not loose where you were if you know the commit-id of where you were. i.e. clean tree and current commit-id.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With