Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to deal with the message about how to perform git pull? #843

Open
lexnederbragt opened this issue Oct 4, 2021 · 6 comments
Open

How to deal with the message about how to perform git pull? #843

lexnederbragt opened this issue Oct 4, 2021 · 6 comments
Labels
type:discussion Discussion or feedback about the lesson

Comments

@lexnederbragt
Copy link
Contributor

Recent versions of git show this message after a git pull:

hint: Pulling without specifying how to reconcile divergent branches is
hint: discouraged. You can squelch this message by running one of the following
hint: commands sometime before your next pull:
hint:
hint:   git config pull.rebase false  # merge (the default strategy)
hint:   git config pull.rebase true   # rebase
hint:   git config pull.ff only       # fast-forward only
hint:
hint: You can replace "git config" with "git config --global" to set a default
hint: preference for all repositories. You can also pass --rebase, --no-rebase,
hint: or --ff-only on the command line to override the configured default per
hint: invocation.

The lesson does not yet seem to take this change into consideration. What would be a good choice for novices here? I tried to look this up, but am not sure. Many seem to suggest to use the ´fast-forward´ as default, but this may lead to unexpected problems in certain cases?

@kjjohnsen
Copy link

Great point. I think a decent option here would be to add --no-rebase to the first mention of "git pull origin main", and then briefly discuss that this avoids a warning from recent version of git. The next line section can then add "git config --global pull.rebase false" to avoid the warning, so that subsequent uses do not require it. We can then provide a link to a document discussing rebasing, or perhaps add another segment discussing it in more detail.

@kekoziar
Copy link
Contributor

Cross-reference #767

@kekoziar kekoziar added the type:discussion Discussion or feedback about the lesson label Dec 23, 2021
@ellio167
Copy link

ellio167 commented Apr 7, 2022

Why not deal with this in Setting Up Git? This seems similar in complexity to the Line Endings issue. Thus, I would think it would make sense, as with that issue, to deal with it at setup and avoid the cognitive load of having it show up when students are trying to understand the complexities of remotes and pull/push.

@TomMelt
Copy link

TomMelt commented Jul 26, 2023

This issue has technically been solved (by #873) but due to a switch of platform it never got merged. This would make a great beginner issue. If not I will look at re-submitting a PR for the new platform.

@ha0ye
Copy link

ha0ye commented Feb 29, 2024

Flagging this as it has recently come to my attention (though I haven't run into it yet, since my git version is older)

@martinosorb
Copy link
Contributor

@TomMelt would you still be willing to submit a PR for the new platform?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:discussion Discussion or feedback about the lesson
Projects
None yet
7 participants