DOI-BOR / ostrich

An optimization toolkit for model calibration
GNU General Public License v2.0
1 stars 1 forks source link

Pr/3 #13

Closed julemai closed 4 years ago

julemai commented 4 years ago

I really don't know how to resolve this conflict without a branch etc.

dloney commented 4 years ago

What is this fixing and why are the commits form #3 included in it? Can you make a clean branch with the changes you want?

julemai commented 4 years ago

I did that in the pull request you already merged. But it is creating a conflict as it does not appear in the master. I have no idea how to resolve this.

dloney commented 4 years ago

These changes shouldn't be merged into master in this form because it's mixing code from pull requests. You'll need to make a clean branch off of the existing master, put your write utility changes into that, and then make a new pull request.

julemai commented 4 years ago

But what happened to https://github.com/usbr/ostrich/pull/2? Shall I just open this again? That pull request is exactly what I need and it just does not appear in the master (or is causing a conflict). I just tried to resolve the conflict...

dloney commented 4 years ago

I merged #2 into master on Friday. Did you fetch upstream to resync your fork?

julemai commented 4 years ago

I followed the steps to resolve the conflict:

Step 1: From your project repository, check out a new branch and test the changes.

git checkout -b julemai-pr/3 master
git pull https://github.com/julemai/ostrich.git pr/3

Step 2: Merge the changes and update on GitHub.

git checkout master
git merge --no-ff julemai-pr/3
git push origin master

I think I am missing something major here. I would appreciate if you could teach me how to do this.

dloney commented 4 years ago

It looks like you haven't synced your fork with the main repository which is why you're not seeing the changes locally. Origin is your local fork master. You'll need to set the main repo as upstream so you can fetch. Here's how to do that: https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/configuring-a-remote-for-a-fork

Once you have your upstream set, you'll need to fetch and merge the changes from upstream/master to origin/master. Here's a link with how the process works: https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/syncing-a-fork I'm happy to do a webinar to talk you through setting up your fork if it would be helpful.

Be careful when you use the --no-ff flag. If the command had issued the way you thought it had on the upstream repot, it would have forced updated all the files. It's preferable to resolve all the issues in the pull request prior to merging into the upstream master.

julemai commented 4 years ago

I'd very much appreciate if we could meet online (maybe tomorrow?) to get that setup.

The steps I listed were given by GitHub to resolve that conflict manually. I just cloned everything again from scratch but it still remains unclear to me how one would resolve that conflict. I'm sorry that I messed that up. :(

dloney commented 4 years ago

I'm going to close this pull request since I believe we resolved the issue.