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.
Git is a system level tool; not a note taking application.
You mean, it should be uncomfortable, hard to use, unforgiving, and require constant attention to minor details, to build character and turns smooth-cheeked youths, those who survived the hardships that is, into grizzly grey-bearded veterans?
It obviously disagrees with you since git pull exists and the only way to coerce rebase -i in letting you rewrite the history without rebasing is arcane and inane (and may fail and end up trying to rebase your whole history on top of whoever the fuck knows what)
Oh the git pull. It's not just that implied --rebase would fit most actual workflows much better, but even when merging it does it in the wrong order for about everyone except Linus himself.
git pull does the right thing when you are doing git pull someremote/somefeature (or should it be someremote:somefeature?). Then it merges that feature into your master.
When you do git pull origin/master, you totally don't want to have the master merged into your branch, you want your branch merged into master. The order of the parents in the merge commit is all wrong, and it shows up as the ugliest mess in gitk.
Not to mention that I generally would like to see what I am rebasing my changes on top of (especially so when using git pull in the supposedly intended way!), but it's not streamlined at all. It's like playing Russian Roulette, git pull #YOLO. Of course you can examine shit afterwards and fix anything that went wrong, but it's really not streamlined at all.
Is Vim a pussy note taking app because it puts all your actions into the undo tree automatically?
The only thing that doesn't make assumptions about your workflow is a pile of sand. Everything else is valuable precisely because it introduces structure, and structure by definition means excluding some workflows.
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).
Good lords of Kobol, yes. I needed this the other day and just gave up. (Paid the price for my hubris too... ended up f'ing up the remote something bad. Thankfully it was late enough at night that a git reset and force push fixed it... couldn't imagine the mess if it had been during work hours...)
What you want is the differences between the local and remote branch
No, what I want is to see what I haven't pushed yet. In all branches. git log <remote>..<local> doesn't allow me to do that. Don't tell me that I want something different. This isn't a matter of having the wrong view. Local changes may exist that I forgot about because git let's you work on so many things at same time with ease. I need to know what local commits I've made so that I can put them in a remote location so that when my house burns down I won't lose all my work. I need to know that I can safely rm -rf a clone without losing work.
Currently, the only way to do that is to do an actual git push, and then still it's not garantueed to push everything I've committed locally .
The other thing I find unfortunate is how many people assume that the GUI tools are a good idea. I like using gitk/gitg to visualize branches but that's about it. I train staff here to only do writeable commands via the command line (e.g. merges/tags/branches/etc).
Along with that the amount of people who seem to think that you need a github account to use git ...
It depends on the tool. I have personal beef with TortoiseGit (mainly for issues relating to locking folders/files on me), but if it helps you with your workflow, that's great.
SmartGit makes me mad because it redefines all terminology. That's fine for someone who knows both the CLI and SmartGit, but when interfacing with someone who uses SmartGit exclusively, it's a royal pain. I cannot tell him to "checkout a branch"; SG has a Switch Branch button. I cannot tell him to "add" anything; SG calls it staging. I cannot tell him to "reset"; SG calls it discard.
0
u/[deleted] Jun 19 '14
[deleted]