- I say: "git fetch origin v0.16.2".
- It clearly says it fetched the tag v0.16.2
- I say git checkout v0.16.2
- It says that doesn't match anything
- Why can't I get ye flask

@mcc not answering the question and i realise this is a failure of git but what the fetch output actually said is it pulled the remote ref v0.16.2 and put it in the local ref FETCH_HEAD

@passcod thank you for the explanation. what a strange thing to do tho

@mcc @passcod You can specify the local ref to write to by using `:` notation, just like with git push. In general fetch doesn't touch local refs unless told to (though tags are a bit special, but not in this specific case).

Follow

@mcc @passcod Not exactly; it only updates remote-tracking branches, and there are no remote-tracking tags to update. So after `git fetch origin main` you would have it in `origin/main`, not in `main`.

I rarely use pull in git myself, I usually fetch and then decide what to do (merge, rebase or do nothing if not needed). Fetching tags has some special logic meant to make things simpler, but this sure can make things confusing too, especially when 99% of what you explicitly fetch are branches 🤪

@dos @passcod it seems to me that branches and tags are more unalike in the interface than they should be.

Sign in to participate in the conversation
Librem Social

Librem Social is an opt-in public network. Messages are shared under Creative Commons BY-SA 4.0 license terms. Policy.

Stay safe. Please abide by our code of conduct.

(Source code)

image/svg+xml Librem Chat image/svg+xml