On 8 August 2012 20:55, John Kinsella <j...@stratosec.co> wrote:
> Guys - just noticed something strange happened with a commit last night where 
> I added my PGP key to the KEYS file…
>
> (going into details in case this happens to others)
> After adding my key and double-checking things, I committed the change but 
> ran into ASF password issues while trying to do the push to master. During 
> the debugging of that I modified .git/config, thinking I had a problem with 
> trying to push to a read-only repo URL.  When I got home later last night I 
> realized it was password-related and pushed the changes out.
>
> Looking at cloudstack-commits@ this morning, I see git turned the push into 2 
> commits - the KEYS file and a "merge" to master, which I think is the result 
> of the repo URL getting tweaked. Two commits/pushes happened since I had 
> committed my KEYS change, but git didn't ask me to pull down those changes 
> before doing the push, as it usually does.(lesson learned: always do git pull 
> before git push) It looks like no files were modified by the merge, other 
> than git metadata.
>
> Open on suggestions if I should revert this, leave as is, or other...
>
> Just wanted to bring this up in the spirt of transparency.
>
> John

This happens often and is not really a problem I think. When you do a
---rebase while pulling the tree remains in order. Without rebase it
gets staggered and git cleverly applies the changes as a merge commit.
I do the following to prevent this from happening:

$ git pull --rebase origin master
$ git push origin master

Git does complain in case the local HEAD doesn't match the remote HEAD
commit. So in your case most likely there were no changes to pull and
your tree was already up to date.



-- 
Prasanna.,

Reply via email to