Git problems using amend commit / branches / merging

I have the following strange behaviors.:

EGit after “Amend previous commit” removed pushed code is back
Committed content back in EGit “Unstaged Changes” after branch switch

The second case leads me to assume it is a Servoy related problem, because:

  • I used EGit to commit & push to server. → No error (Unstaged & Staged area in EGit empty)
  • Then I switched to branch master using Git command line
  • Then I tried to merge using Git command line → Error because committed / pushed content in back, so no EGit was involved in this case

Also today I used the command line to checkout / merge a branch using the Git command line and Servoy was closed. After starting Servoy I had a lot of changed content in the EGit “Staged” and “Unstaged” area. So this lets me also assume it is a Servoy related problem, but I’m unsure. Also I think Eclipse and EGit are widely used, so these behavior would be noticed, cause these behavior is not rare.

This behavior is really a blocker for using Servoy/Egit branches.

I really need help, to clarify where the problems lies.

I reported it to the EGit bugtracker.

EGit Bug 440844 - EGit after “Amend previous commit” removed pushed code is back
EGit Bug 440851 - Committed content back in EGit “Unstaged Changes” after branch switch

first i want to stress out here, never use amend to previous commit if you already pushed the commit to a remote server!
That’s really a no go. Because you alter history then for other persons that already seen your pushed commit.

Als the second one, if egit is suddenly saying that you have u changed files, what does your staging view say? It should say that there is a file changed.
If so what is the change that you see?

jcompagner:
first i want to stress out here, never use amend to previous commit if you already pushed the commit to a remote server!
That’s really a no go. Because you alter history then for other persons that already seen your pushed commit.

Ok, that was the only one. ;)

jcompagner:
Als the second one, if egit is suddenly saying that you have u changed files, what does your staging view say? It should say that there is a file changed.
If so what is the change that you see?

The staging view was showing the changed file, but that was the change that I have committed before I switched the branch. See my question at Stackoverflow: Committed content back in EGit “Unstaged Changes” after branch switch

Now I have also the duplicate form found problem again.:

[attachment=1]2014-08-05_19_27_50-Servoy_Developer_duplicate_form_after_branch_switch.png[/attachment]

The form is there really twice in Servoy, but only once in filesystem.

[attachment=0]2014-08-05_19_47_18-Duplicate_form_error_filesystem.png[/attachment]

Today I deleted form “br_boss_buha_faktura_paymentInfo” renamed form “br_boss_buha_faktura_paymentInfo_dtl” to “br_boss_buha_faktura_paymentInfo” and committed and pushed it to branch “buha_faktura_simba”. I worked a lot the day, closed Servoy openend Git terminal window and wanted to checkout the master branch. That was not possible, so I stashed all my changes, switch then to the master branch. I applied the stashed changes to my master branch and resolved the merge conflicts. Then I committed the desired file to the master branch and pusehd to the server. Then I wanted to checkout the buha_faktura_simba branch. That was not possible, so I stashed all my changes, then switched to the buha_faktura_simba branch. Then I switched again to the master branch, because I realized that I need to export the master branch solution for the application server. Then I opened Servoy and exported the solution for the server. The I swicthed back to buha_faktura_simba.

=> Now I have the duplicate form problem.

Maybe the problem was before, but I realized the duplicate form problem after I tried to start the solution after branch switch in the last step.

2014-08-05_19_27_50-Servoy_Developer_duplicate_form_after_branch_switch.png

Today I had the following case.:

  1. worked in a branch, created 2 new valuelists and coded in some existing files.
  2. committed & pushed all the stuff the branch / server
  3. merged the master branch into this branch
  4. pushed to server
  5. switched to master branch
  6. merged remote master into local master branch
  7. pushed to remote master branch
  8. started Servoy again => then I have 2 empty valuelist files in my staging area, exactly the files that I committed before the other branch
  9. closed Servoy
  10. in Git console showed diff using git diff & git diff --staged => there are no differences

[attachment=0]2014-08-06_19_09_55-Git_Servoy_empty_valuelist_error.png[/attachment]

      1. & 8. - 9. in Servoy / EGit
      1. & 10. in Git console

if you have a sequence that is reproducible then make a case for that
Because it could be that the internal in memory representation is not always fully in sync when you constantly are switching between branches
We should get deletes and inserts of files from the system and update the persist model that’s in memory

deezzub:
Today I had the following case.:

  1. worked in a branch, created 2 new valuelists and coded in some existing files.
  2. committed & pushed all the stuff the branch / server
  3. merged the master branch into this branch
  4. pushed to server
  5. switched to master branch
  6. merged remote master into local master branch
  7. pushed to remote master branch
  8. started Servoy again => then I have 2 empty valuelist files in my staging area, exactly the files that I committed before the other branch
  9. closed Servoy
  10. in Git console showed diff using git diff & git diff --staged => there are no differences

[attachment=0]2014-08-06_19_09_55-Git_Servoy_empty_valuelist_error.png[/attachment]

      1. & 8. - 9. in Servoy / EGit
      1. & 10. in Git console

Yesterday, I applied a stash, then I had a merge conflict, that I resolved today, after moving the resolved file to the staged area in EGit, the empty valuelist files are gone from the EGit unstaged area.

jcompagner:
if you have a sequence that is reproducible

I think it is obvious, if you work with branches. This strange behavior, I have very often. What I have done, can you see above. I do not know what else I can do to make it reproducible. You simply need to try it yourself, I’m sure sooner or later you will see that.

SVY-7012: Git problems using commit / branches / merging

Slightly off-topic: Tower 2 (http://www.git-tower.com/) is the first GUI git client that we’re quite impressed with. Noticeably better than any other git setup we’ve tried.

what a weird website, if i click on download, i get a zip, but thats only a mac
Thats something they really don’t mention at the first sight, thats mac only…

Hi Johan,

I thought the screenshots on that same page made it pretty obvious though ;)

i have seen more sites that uses screenshot from a mac to demonstrate the product, but those still have also a windows or other platform support.

I guess it’s time to dust off your Mac then ;)

By the way,

You could also check out SourceTree from Atlassian. They have a nice Git/Mercurial client that is for Mac and Windows.
Not as nice as Tower2 but still pretty nice and it’s also free.

http://www.sourcetreeapp.com

David, Robert, do you use Servoy with Git and branches?

Hi Sebastian,

I played with it but don’t use it with any projects yet.

deezzub:
David, Robert, do you use Servoy with Git and branches?

We don’t. Since we use Git for all types of development and Git being the beast that it is, it’s easier/simpler for us to use a stand alone tool. Only one interface to learn.

ROCLASI:
I guess it’s time to dust off your Mac then ;)

I heard all of these companies bought macs just to use Tower 2 :D

[attachment=0]Screen Shot 2014-08-11 at 10.46.46 AM.png[/attachment]

Hi David,

david:
We don’t. Since we use Git for all types of development and Git being the beast that it is, it’s easier/simpler for us to use a stand alone tool. Only one interface to learn.

So you do use it with Servoy, you just don’t use EGit. I believe that was Sebastians question.

ROCLASI:
Hi David,

david:
We don’t. Since we use Git for all types of development and Git being the beast that it is, it’s easier/simpler for us to use a stand alone tool. Only one interface to learn.

So you do use it with Servoy, you just don’t use EGit. I believe that was Sebastians question.

Thanks Robert, that is what I want to know. :)