The set of things you can do with a repository is small enough
The set of things I need to do often, sure, is small enough.
But there's quite a long tail of things that I need to do rarely and have to look them up on the internet because they don't logically follow from anything I do day to day.
How do I delete remote commit tag? How do I make a branch tracking if I failed to do that initially? WTF is the difference between "tree-ish" and "commit-ish" and why does git archive use it to decide whether to use local or commit time when checking out?
That's not at all what the OP is concerned about by the way. They talk about reinventing several fundamental concepts of the interface, like embrace the fact that git repository is append-only (until gc runs) and make it truly append only, so that you always have access to the original commits that you rebased. Also automatically make WIP commits of the working copy before any git operations that can affect it -- I would actually go even further and say that these commits should be fully automatic and continuous, basically I want a persistent undo tree which I can tag as I work and then, after I'm done, arrange my changes into changesets that go to the public history.
How do I make a branch tracking if I failed to do that initially?
Git literally tells you this:
fatal: The current branch fake has no upstream branch.
To push the current branch and set the remote as upstream, use
git push --set-upstream origin fake
Oops, I meant remote tag. I even more or less remember it by now, it's something like git push :/refs/tags/<tag>. It doesn't make much sense to me, but whatever.
Git literally tells you this:
... if I try to push. Just making a branch tracking is more involved.
And to answer my third question, apparently a "tree-ish" that's definitely not a "commit-ish" should have the form <commit-ish>:<path>, where path can be empty if you want to get a snapshot of the entire repository. This is folk wisdom propagating through forums and stackoverflow, by the way, at least I've never seen anything like that in the FM.
You shouldn't do that either. If someone had pulled that tag down they won't notice you deleted it. They'll forever have the older copy of the tag. (which I admit is a failing in Git).
28
u/moor-GAYZ Jun 19 '14 edited Jun 19 '14
The set of things I need to do often, sure, is small enough.
But there's quite a long tail of things that I need to do rarely and have to look them up on the internet because they don't logically follow from anything I do day to day.
How do I delete remote
committag? How do I make a branch tracking if I failed to do that initially? WTF is the difference between "tree-ish" and "commit-ish" and why doesgit archiveuse it to decide whether to use local or commit time when checking out?That's not at all what the OP is concerned about by the way. They talk about reinventing several fundamental concepts of the interface, like embrace the fact that git repository is append-only (until gc runs) and make it truly append only, so that you always have access to the original commits that you rebased. Also automatically make WIP commits of the working copy before any git operations that can affect it -- I would actually go even further and say that these commits should be fully automatic and continuous, basically I want a persistent undo tree which I can tag as I work and then, after I'm done, arrange my changes into changesets that go to the public history.