Hacker News new | past | comments | ask | show | jobs | submit login

>Why does 'pull' imply 'checkout'?

???

It doesn't.




It sadly clobbers your working tree. Not calling that checkout doesn't make it any better. Nothing other than checkout ought to change the working tree -- is that too much to ask?


There are plenty other commands that change the working tree. rebase, cherry-pick, revert, merge, etc. Are you suggesting that all these should be done by checkout?

pull is fetch + rebase or merge. You can use fetch instead of pull if you prefer. Or `git remote update`, for that matter.


How does it clobber your working tree? You’ll get an error if there are any conflicts.


Yes, sorry, that was poor writing style. Git does indeed warn you that it would clobber your working tree and suggests that you do it in its behalf (the stash/pop dance).

Why is the user exposed to that? If git needs those files checked out for the merge, does it really have to be in the working tree? Why not in a hidden, ephemeral subdirectory? Leave my working tree alone, I say!




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: