Skip to content

Git pull #3

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

Closed
wants to merge 1 commit into from
Closed

Git pull #3

wants to merge 1 commit into from

Conversation

anjakefala
Copy link

Added in a note which elaborates that git pull is a summary command of git fetch and git merge.

@jiffyclub
Copy link
Contributor

Thanks for moving this over, sorry for the trouble. I'm -1 on this change because it introduces two new commands and the associated overhead without a concrete benefit to the learners. It can certainly be useful to know about fetch and merge, but not really within the context of this lesson. Thoughts @jhamrick?

@jhamrick
Copy link

Hmm, yeah, I think I agree with @jiffyclub . It would definitely be nice for them to learn about fetching and merging at some point (I myself almost never use git pull anymore, because I think git fetch and git merge is better), but I think it would be more appropriate in the context on a whole lesson on branching and merging, or something like that.

@gvwilson
Copy link
Contributor

So move it to git-intermediate?

@ahmadia
Copy link
Contributor

ahmadia commented Dec 11, 2014

The Git intermediate lesson I teach breaks these two concepts apart cleanly (fetching and merging). I think the fact that git pull is really git fetch followed by git merge belongs in the instructor's notes for this lesson, but not the content presented to learners.

@embray
Copy link

embray commented Dec 11, 2014

Um, are we saying we wouldn't teach git pull at all? I think it's the sort of thing that knowing about is highly valuable, if it's used correctly (which is why I agree it shouldn't go in the beginner lesson). But hardly a day goes by I don't run git pull.

@ahmadia
Copy link
Contributor

ahmadia commented Dec 11, 2014

@embray - You read the discussion in reverse :) git pull to novices, git fetch and git merge to intermediates (with the short-hand git pull likely explained).

@embray
Copy link

embray commented Dec 11, 2014

Apparently so! I guess I'm okay with that then, now that I read the lesson. Putting it in the instructor's notes makes sense.

@wking
Copy link
Contributor

wking commented Dec 11, 2014

On Thu, Dec 11, 2014 at 01:25:31PM -0800, Erik Bray wrote:

Um, are we saying we wouldn't teach git pull at all?

I put some fun links into the Git mailing list about pull at the end
of this comment 1 ;). I agree that I'd start folks out with
explicit fetch/merge calls to help their mental model, and mention
‘pull’ in the intermediate lesson.

@wking
Copy link
Contributor

wking commented Dec 11, 2014

On Thu, Dec 11, 2014 at 01:27:19PM -0800, Aron Ahmadia wrote:

git pull to novices, git fetch and git merge to intermediates
(with the short-hand git pull likely explained).

Not the way I'd do it, but I'm not maintaining this lesson, and I
imagine it will work out fine this way as well ;).

@jiffyclub
Copy link
Contributor

The current lesson teaches only pull, and for simplicity we are pushing to maintain that here in the novice lesson. But discussion of fetch and merge certainly have a place somewhere in our lessons, possibly the intermediate section as Greg suggested.

@embray
Copy link

embray commented Dec 11, 2014

I definitely agree with @wking about teaching fetch/merge as being better for developing a working mental model of how git works. At the same time, I think for an introductory lesson that's less important. Developing that mental model is going to take time no matter what, and I think just telling people to run git pull to get updates from upstream is simpler (otherwise you have to a explain what a merge is... which you we should, but later...)

My one problem with pull is that it can have very different behavior depending on what's in your git config. And that behavior has also changed between versions of git, and I've seen weird things happen when trying to teach it to different people. But that was a couple years ago--I think maybe that issues has settled down a bit?

@wking
Copy link
Contributor

wking commented Dec 11, 2014

On Thu, Dec 11, 2014 at 01:32:36PM -0800, Matt Davis wrote:

The current lesson teaches only pull, and for simplicity we are
pushing to maintain that here in the novice lesson.

I think the forces that need to be balanced are:

  • Simplicity via fewer commands (favors pull), and
  • Simplicity via less magic (favors fetch / merge)

Either way, it shouldn't be a major rewrite to switch between the two
styles, but we don't need to rewrite anything if the maintainers feel
the balance leans in favor of pull.

@embray
Copy link

embray commented Dec 11, 2014

And if it's in the instructor's notes it's certainly something that they can explain if appropriate.

@ahmadia
Copy link
Contributor

ahmadia commented Dec 11, 2014

Before this gets too far off-course, I should point out that within the context of this novice lesson, branches have not been introduced yet, and a "single synchronization" model is being used. I think git fetch/merge in this context would be introducing too many new concepts. Whether the git novice lesson should be teaching git fetch/merge instead of pull should probably go into another issue.

@ahmadia
Copy link
Contributor

ahmadia commented Dec 11, 2014

And @damedebugger - Hi! Thanks for the suggestion! :)

@gvwilson
Copy link
Contributor

+1 to 'pull' for novices, 'fetch' and 'merge' for intermediates.

@wking
Copy link
Contributor

wking commented Dec 11, 2014

On Thu, Dec 11, 2014 at 01:39:27PM -0800, Aron Ahmadia wrote:

Before this gets too far off-course, I should point out that within
the context of this novice lesson, branches have not been introduced
yet, …

True. I don't think we're mentioning “branch” to the novices at the
moment ;). If you only ever deal with single-branch repositories,
conflating repository with branch is ok.

@anjakefala
Copy link
Author

Hi! : )
To clarify, I also agree that fetch and merge would confuse a novice. I tested that out first hand. I completely agree that pull is more elegant in that manner. I made this change because I thought the tabbed parts of the lessons were more for people reading online or for some extra fun fact if it was a strong class because I believe that fetch and merge make lives easier in the long run. It was more of a "by the way, down the line when you're more confident this is something to be aware of".

I'm new to software carpentry, so I wasn't aware of the content in the intermediate lessons and haven't gone through the GIt lesson there yet. Now that I have, I agree that Fetch/merge definitely feel more at home there.

And I now I realized and agree that bringing up random words that you don't follow through with will probably confuse more than help. Including resulting in questions like "What's the difference between them and pull? Why have them both?" which would result in going much more in depth into a topic that didn't have established prereqs before hand.

@jiffyclub
Copy link
Contributor

I'll close this, thanks for the suggesting the change! Please feel free to contribute new material to the intermediate git lessons if you like, those are still part of the bc repo for now. The novice lessons have also long been in need of a dedicated lesson on branching if you feel like tacking that. (@dtrapezoid has a draft lesson.)

I hope this experience still counts for your instructor training project! 😄

@jiffyclub jiffyclub closed this Dec 11, 2014
gvwilson pushed a commit that referenced this pull request Feb 12, 2015
Update validator to work with revised LICENSE.md.
@kekoziar kekoziar mentioned this pull request May 16, 2018
dlstrong referenced this pull request in dlstrong/git-novice Jun 10, 2018
Fixed link to rendered version in README
dlstrong referenced this pull request in dlstrong/git-novice Jun 1, 2019
maxim-belkin pushed a commit to maxim-belkin/git-novice that referenced this pull request Oct 31, 2019
fmichonneau pushed a commit to fmichonneau/git-novice that referenced this pull request Jul 1, 2021
zkamvar pushed a commit that referenced this pull request May 8, 2023
Putting template into final [sic] form
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants