[GeoNetwork-devel] About pull requests

hello,

a question about pull requests :

I have just merged a pull request to 2.8.x : https://github.com/geonetwork/core-geonetwork/pull/5/commits.

This requests consists of 2 commits. One (https://github.com/ianwallen/core-geonetwork/commit/7ed02dbaec28cef8d742e584619f339a2cb5fc7f) contains the file changes that this is actually about.

But the other (https://github.com/ianwallen/core-geonetwork/commit/b16fba8cf6babb49cbdfc62b7cff097105689e4d) appears to contain other changes that moreover, according to me, already were as such in 2.8.x.

How does this work ? What has actually happened ?!

Thanks and kind regards
Heikki Doeleman

What I think happened is ian applied his fix to his branch/fork. then realized that he had changes on 2.8.x that needed to be merged as well. So he merged instead of rebased which created a merge commit. When you merged the pull request it added the two commits even though the merge made no change because you were already up-to-date.

It is not a big deal but a cleaner way to make a merge request is to keep the changes on top. So if you make a patch then realize that your branch is out of date you can do:

git fetch upstream
git rebase upstream/2.8.x

That will pull off your change put the changes from 2.8.x on your branch then apply your changes on top again. However when you push to your fork you will have to do:

git push --force

because you have changed history with the rebase and you have to tell git that you know what you are doing.

Jesse

On Tue, Jun 26, 2012 at 9:34 PM, heikki <tropicano@anonymised.com> wrote:

hello,

a question about pull requests :

I have just merged a pull request to 2.8.x : https://github.com/geonetwork/core-geonetwork/pull/5/commits.

This requests consists of 2 commits. One (https://github.com/ianwallen/core-geonetwork/commit/7ed02dbaec28cef8d742e584619f339a2cb5fc7f) contains the file changes that this is actually about.

But the other (https://github.com/ianwallen/core-geonetwork/commit/b16fba8cf6babb49cbdfc62b7cff097105689e4d) appears to contain other changes that moreover, according to me, already were as such in 2.8.x.

How does this work ? What has actually happened ?!

Thanks and kind regards
Heikki Doeleman


Live Security Virtual Conference
Exclusive live event will cover all the ways today’s security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/


GeoNetwork-devel mailing list
GeoNetwork-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geonetwork-devel
GeoNetwork OpenSource is maintained at http://sourceforge.net/projects/geonetwork

Jesse,

Thanks for the explanation, I think that is exactly what I did. - I will try
to GIT it right next time. : )

--
View this message in context: http://osgeo-org.1560.n6.nabble.com/About-pull-requests-tp4984051p4984191.html
Sent from the GeoNetwork developer mailing list archive at Nabble.com.

haha funny guy. It is not critical. It is just a single extra commit message. I appreciate all the pull requests you have been submitting.

Jesse

On Wed, Jun 27, 2012 at 1:03 PM, ianwallen <ianwallen@anonymised.com> wrote:

Jesse,

Thanks for the explanation, I think that is exactly what I did. - I will try
to GIT it right next time. : )


View this message in context: http://osgeo-org.1560.n6.nabble.com/About-pull-requests-tp4984051p4984191.html
Sent from the GeoNetwork developer mailing list archive at Nabble.com.


Live Security Virtual Conference
Exclusive live event will cover all the ways today’s security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/


GeoNetwork-devel mailing list
GeoNetwork-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geonetwork-devel
GeoNetwork OpenSource is maintained at http://sourceforge.net/projects/geonetwork