MetOs-UiO / eScience2024

https://metos-uio.github.io/eScience2024/
1 stars 12 forks source link

Workflow eScience 2024 suggestion #18

Closed Ovewh closed 5 months ago

Ovewh commented 5 months ago

I think instead of having all the information spread around at different places and you kind of have to jump around to find it in order to get started. It would be nice in the set up section just to have steps with that one can more or less copy. That all the info to get going would be available there. E.g.

  1. Fork
  2. Clone + add access token
  3. Add upstream as remote...

We should also mention that we would recommend that they also add the remote to the upstream repo in their own clone. And sync it often and suggest them to sync of for it not to becomes out of date.

The sharing code stuff could could perhaps a separate page. The rules could be together with the setup since these contain the most important info.

sarambl commented 5 months ago

Hi! I think I might be dumb, but from the text I don't understand why they need to set up remotes? https://metos-uio.github.io/eScience2024/git_integration/remotes/

Ovewh commented 5 months ago

Because we wanna use a forking workflow, and they need to keep their fork up to date with the upstream main branch if they are going to be able to merge their changes later on. Also if they want to check out branches of other group members.

Therefore atleast a remote to the main repo is needed.

Though you could also update your fork via github and then pull the changes from there. Then setting up the remote is not strictly necessary

sarambl commented 5 months ago

I was thinking maybe it would be easier for them to initially just update their fork and pull the changes from there? Just by experience they find all this very confusing..

Ovewh commented 5 months ago

Sure that is possible, it will be confusing regardless i think. Though if we give them the commands to use and how to setup the remote, it is not that different from pulling from the upstream than from origin fork.

To pull from the upstream repo:

git pull upstream main

To pull from their fork:

git pull origin main
mvdebolskiy commented 5 months ago

I was thinking maybe it would be easier for them to initially just update their fork and pull the changes from there? Just by experience they find all this very confusing..

They can always sync main in their fork with the upstream on the web-interface. But it's way better to have at least an upstream remote locally, so you don't have to switch between the tabs in your browser for no reason and just fetch all the remotes through command line and the button. You will also see what is happening on the remotes in the GUI history tab.

mvdebolskiy commented 5 months ago

20

sarambl commented 5 months ago

I tried the setup now, and I get a couple of errors. With the above commits it works for me.