What are the recommended steps for committing changes to the main branch with Eclipse + egit?
I have been using Eclipse and svn for a long time and everything works beautifully there. Whenever I am about to commit a change, my flow is the following:
In the rare cases where I attempt to commit a group of files without a commit, I am warned about it and can correct the changes nicely.
Even if I update files that are conflicting, it isn't bad to recover from that though I find that synchronizing with workspace first to identify and merge files with conflicts is a much better flow than attempting to merge after an update that failed because of conflicts.
With egit, no flow that I tried worked properly. First, if I mistakenly do a pull from the server and that there are conflicts, I am told there was a conflict but then am very confused about it: I have a hard time retrieving the latest from server and find it impossible to commit my files no matter how much synchronization I do. Even replacing my file with the latest from head and doing another pull and then commit doesn't seem to work anymore.
Even if I follow the same approach I used with svn (synchronize first and merge manually files with conflicts) and follow second with a pull, I still get the same failures I mentioned above, as if my marking a file as merged wasn't accounted for.
So... blank sheet of paper, what are the recommended instructions when I made some changes, want to merge them with the latest code on server (which may include file changes conflicting with my set of changes), and, optionally, want to commit my changes? Pointer to a good egit tutorial is fine if there is one discussing this kind of issues.
I'm not sure if I understood your question correctly. But I'm now trying to give you some hints. We recently converted the repository of our company from CVS to git which was quite challenging as we had a lot of questions focussing on the same problem you are targeting.
First of all I have to say that coming from SVN or CVS you won't be able to do your workflow as you did maybe for years.
Especially working on a small set of files and updating only those via synchronize won't work with git. Here are the steps I take when synchronizing (in terms of getting the latest from the server) with our git.
Add to index
as it's the new mark as merged
. Afterwards you should do Rebase > Continue
if you did a rebase.That's my workflow. If that's the right direction I can add more details why I do several steps as I do and how I think the best way is doing them with egit.
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