Double commits in git history after `git format-patch`,`git am`, `git pull`

Viewed 341

I develop code on my PC, and I have few computing nodes.

To keep my programs synced I decided to use git. Formerly I used it in a one-way mode to "push-down" changes from PC to computing nodes. However from time to time I encountered small bugs that were specific to computing nodes and fixed it on-site. It was easier to test and develop, than writing on PC and committing a change that might or might not have fixed everything.

I decided to use git utilities to send the changes back up-stream into main code base.

I coded fix. Committed it on the computing note, used git format-patch origin. Sent patch to my PC and applied it with git am. Up to this point everything looked pretty sweet.

However, when I used git pull on the computing node it pulled the commit with patch from origin again and git log shows two commits with the same comments and authors.

Have I used commands wrong, or my workflow is flawed? Or this is acceptable? (However it doesn't look good to me).

I worked on master branches in both cases.

git pull computing node:

commit 68710f82ddb2b2f191a9c29f088423853032a851  <--- git pull enforced merge
Merge: ce19df4 609b82b
Author: luk32 <luk32@computing.node>
Date:   Fri Dec 13 20:39:28 2013 +0100

    Merge branch 'master' of PC:~/projects/_cmake

commit 609b82bc96f88da956869cec2953e8621cbdcd93  <--- 2nd git pull after git am
Author: luk32 <luk32@computing.node>
Date:   Fri Dec 13 20:35:23 2013 +0100

    Changed to worki with MathGL version 2. Broken version 1 compatibility!

commit ce19df4760519eaf42269461f7bdcf94b65bdc48  <--- on-site fix
Author: luk32 <luk32@computing.node>
Date:   Fri Dec 13 20:35:23 2013 +0100

    Changed to worki with MathGL version 2. Broken version 1 compatibility!

commit ccc5b8a1854e4ca4089cf4c0945baff990288557  <--- after previous git pull
Author: lukas <luk32@PC>
Date:   Mon Jan 16 10:33:11 2012 +0100

    skeleton changed to introduce project stacks

git log on PC looks fine:

commit 609b82bc96f88da956869cec2953e8621cbdcd93
Author: luk32 <luk32@computring.node>
Date:   Fri Dec 13 20:35:23 2013 +0100

    Changed to worki with MathGL version 2. Broken version 1 compatibility!

commit ccc5b8a1854e4ca4089cf4c0945baff990288557
Author: lukasz kucharski <luk32@PC>
Date:   Mon Jan 16 10:33:11 2012 +0100

    skeleton changed to introduce project stacks

EDIT: computing.node:~/projects/_cmake$ git log --decorate --graph --oneline master

*   68710f8 (HEAD, master) Merge branch 'master' of PC:~/projects/_cmake
|\  
| * 609b82b (origin/master, origin/HEAD) Changed to work with MathGL version 2. Broken version 1 compatibility!
| * ccc5b8a skeleton changed to introduce project stacks
* | ce19df4 Changed to work with MathGL version 2. Broken version 1 compatibility!
|/  
* 35d2eaa (origin/pushee) added eigen3 find module
* 39f4937 small bugfixes and slight changes in the reporting of what's going on
2 Answers
Related