News for hackers. Stuff that matters.
Re:Git Commands You Probably Do Not Need by dreamcompiler on Monday January 23, 2023 @03:36PM (#34494622)
I think I have it now:

Both git fetch and ordinary git push update refs/remotes from refs/heads but they don't change anything under refs/heads at all.

Ordinary git pull will update refs/heads/<currentbranch> because by default it merges/rebases the current branch after fetching, but that's not always desirable when branch switching is expensive.

Pushing locally updates refs/heads/<somebranch> from refs/remotes/<somebranch> without switching to that branch.

Now I also understand @myme's sentence "In fact, in order to properly “push to the local repository” it’s necessary to invoke a git fetch first to ensure that the remote tracking branches are updated."

Thanks to @myme and other responders in this thread!

Re:Git Commands You Probably Do Not Need by myme on Monday January 23, 2023 @06:09PM (#34496426)
Yes! Right on the money! Thanks for coming back to state that it makes sense to you now.