The Official Status Thread
-
I used those two others as intended replacements for two separate things: repository->index, and local copy->working tree.
But if something is in the repository, I'd think it was versioned. Not everything in the index is versioned.
What's an index? Notice that other commands use the word repository. If index means "the index of files in the repository" then I submit using that term is losing sight of the forest for the trees, so to speak.
No, I think you're not understanding what's going on. From man git-commit:
Stores the current contents of the index in a new commit along with a log message from the user describing the changes.
It's a specific thing. If they did the sort of thing you're suggesting, and blakey were savvy enough to notice, he'd rant about how they're using the same word to mean different things.
-
Maybe I spend too much time with Oracle SQL but I either want to commit or not. I don't want or need a bloody middle ground.
But that's like saying you want your data committed before you issue the UPDATE or INSERT statement.
-
Data from a previous transaction? Under the same "commit or not" rules, I've already dealt with it.
Edit: or I've whooshed on what you meant. Which is fine. It's 1:20am and I've been doing an @pjh (read: at the pub) for hours.
-
Data from a previous transaction? Under the same "commit or not" rules, I've already dealt with it.
Same with git then. I'm confused. And not actually a git user.
-
Me too kinda then. I've changed the code but it's not ready yo be committed for everyone, so its not committed. Or I've changed it and everyone else should benefit from it's awesomeness so I committed it. Middle ground not required.
In hindsight maybe my comparison to an RDBMS was a bad one. I don't care enough to confirm.
GitNerdNotFoundException.
-
In hindsight maybe my comparison to an RDBMS was a bad one.
Obviously. Should have use a car analogy.
-
Good point. Git is a fucking amphibious car but I want a convertible BMW. Or something that fits in a @codingwhorror vs @blakeyrant war.
-
Status: Someone shat in the bath tub. Hint, it wasn't me.
The joys of potty training...
-
Someone shat in the bath
Was it Discourse?
Btw: Highlight and quote works better on BlackBerry 10 than Android.
-
I forgot my gloves
Heh. Get an extra pair and keep 'em in the car. Even a cheap pair will be better than nothing.
-
It's a specific thing.
Ok, fine. If it is specifically not the repository itself, then that's ok. Since I don't really use git I have no idea what it is.
Likewise, why use "working tree" as opposed to "working repository", again, unless they're not the same thing, or "working repo" isn't the correct term--I'm not very familiar with ANY dvcs tbh.
-
-
Status. I should be asleep right now...
-
Me too considering it's 03:47 and I've been back from the pub/bar less than 10 minutes.
-
Likewise, why use "working tree" as opposed to "working repository", again, unless they're not the same thing, or "working repo" isn't the correct term--I'm not very familiar with ANY dvcs tbh.
The repository you work with contains all the commits. The working tree is a set of files that you are working with. You can add the files to the index and commit the index to the repository. From there, you can push your local commits to the upstream repository.
-
@Polygeekery said:
Status: Someone shat in the bath tub. Hint, it wasn't me.
Glad you cleared that up for us.
Are we all going round @Polygeekery's place to bathe?
I guess that works for Blakey given his water heater issues...
-
The most important lesson I learned about git is that you can't just copy/paste a git working folder on your local PC and expect it to be a viable backup.
Wut?You did something strange, because copying a Git repo (specifically, the .git folder) is how you back up a Git repo... (or is one way).
-
I made a my initial repo using git svn clone, so dunno if that's any different to normal git repo—perhaps that's the reason?
ETA: I do that (copy backup) with SVN repos all the time, which was why I was expecting it to work...
-
What's an index? Notice that other commands use the word repository. If index means "the index of files in the repository"...
It doesn't. It's an intermediate staging area between the working copy and the repository proper. Many UIs hide this from you (as doesgit commit -a
), but committing is a two-step process in Git: you add changes from the working copy to the index (more on that terminology on a future post; this is done withgit add
); and then you take the index, move it to the repository, and make that the new head of whatever branch you're on.The index is there so that you can more easily manage what actually goes from your working copy into the commit you finally make; e.g. if you only want to commit some of the changes in your working copy, you manage that through the index.
-
I made a my initial repo using git svn clone, so dunno if that's any different to normal git repo—perhaps that's the reason?
Nope, that gives you a normal git repo. Unless you left out the .git folder, or only copied part of it, or something, it should have worked. (.git is all you need, even.) What went wrong?
-
What went wrong?
I can probably give you a copy of the folders if you want to go all CSI all over it..
-
I am actually a fan of Git, as you may be able to tell. When I pick most software I use in a category it's because I hate it less than the alternatives (I say that I like using Windows at home and Linux at work because that way my OS pisses me off in different ways; I can never tell how serious that sentiment is), but Git is one of the few pieces of software that, by and large, I actually like using. It fits what I want VCS to be quite closely; in particular, I love the index and I love
git add --patch
and--interactive
, to the point of writing a script that sorta kind a emulates--patch
for Subversion (which we use at work). I really like the ability to commit semi-speculatively, and then sort out things later with interactive rebasing, although I can never tell whether it's worth the time.Now, all that said... blakey has a bit of a point. There are some significant terminology issues. One huge problem is that various places use several different terms for the same damn thing; for example, when talking about moving from the working copy to the index:
- "Add", as in
git add
- "Update", as in the option in
git add --interactive
and the output ofgit status
. This term barely even makes sense, and the first time I saw it ingit add --interactive
I had to look up what the hell it meant. I guessadd
is too simple of a word for whoever wrote that UI. - "Stage", in the documentation
I feel like I'm forgetting something. But once you do that, things are in the "index" aka "staging area." And once there, you can see differences using "git diff --cached". (And there are other commands that take
--cached
too.) Admittedly, they added--staged
as an alias so that you can probably now mostly ignore the "cached" term, but that's pretty much the first step on a long journey. I doubt--cached
even is or will be deprecated.Or take
git revert
. I'm pretty sure that Linus or whoever specifically chose that term to annoy users of every other version control system ever made, because it does something completely different.And then there are occasional things that just... are pretty much broken. One problem that I consider to be hugely obnoxious is a discrepancy between how interactive rebasing works in two similar scenarios. There are two reasons that an interactive rebase will suspend itself so you can work with the current working copy: if it hits a conflict when applying a patch and needs you to resolve it, or if it hit a patch that you told it to stop on with
edit
in the rebase instructions. But how you deal with these differs. If I remember right:- When the rebase stops on a conflict, the index contains all of the changes from the patch that conflicted, except for the conflicted files. So you have to (1) resolve the conflict, (2) add relevant changes to the index, (3) commit, (4) continue the rebase.
- But when the rebase stops for an
edit
, the patch in question has already been committed. That means that if you want to edit it (now why would you want to do that when you told git "edit" :eyeroll:), you have to amend the current head.
I consider the decision to have the "edit" suspension work that way to be awful. (Well, the discrepancy is awful, and I am not sure you could change the conflict behavior to agree with the edit behavior. And the conflict behavior is what I'd expect for edit anyway. If it weren't for the conflict behavior the edit behavior would be worthy of a long eyeroll and then moving on.) I discovered this discrepancy when I was trying to do a rebase, and it kept coming out wrong, with a bunch of squashed commits that I didn't want squashed. It turns out that what I was doing wrong was treating the first case as if it were the second -- when I finally made the commit, I was passing
--amend
which squashed it.
- "Add", as in
-
If you feel like it. I'm kinda curious, but I don't think I'm curious enough to spend much time on it. ;-)
-
It has changed names more than Elizabeth Taylor,
For your convenience I changed the title to include Elizabeth ...
-
The joys of potty training
End result of getting rid of diapers is worth some trouble.
-
Good call. It has changed names more than Elizabeth Taylor, if you find it let me know.
Bzzzt. She never changed her name, not even after every time she married (if that's what you're getting snarky at.)
In fact she didn't even have to change her birth name to either
- make it less embarrassing or
- allow her to register with Equity
which are the usual reasons for a performer to change their original name
-
If git is making you sad, you could try giving eg a go. It's a git frontend which translates sensible VCS commands into git notation., and also tries to format git's output back into something a human being could understand. I had a reasonable amount of success with it during my foray into git territory.
Sadly that page links to the wrong development URL, it's now at https://gitorious.org/eg/mainlineI noticed that the latter also has an eg.bat file for use on Windows, though I've never tried
eg
on Windows.
-
discard (which could be renamed to undo, but I think that would be a poor choice (EDIT: revert makes sense here though)) discards the changes you're currently working on.
revert
exists already: it reverts to a previous commit.Your other suggestions sound good.
-
Status: caffeinated and ready to GO GO GO GO GOTTA GO FAST GOTTA GO FAST GOTTA GO FASTER FASTER FASTER FASTER FASTER
Oh shit no it's running out.
Must... not... fall asleep on keybggggggggggggggggggggggggggggggg fuck
-
-
I am actually a fan of Git, as you may be able to tell.
Are you also a fan of gimp masks and safe words?
There are some significant terminology issues.
It has a billion usability issues. The terminology issues are just the tip of the iceberg.
The real problem is Git was written by a bunch of people who simply do not give a shit about usability, accessibility, or user experience. If Linus did show this terminology to his cronies in alpha versions, his cronies are complete sycophants if they didn't say, "hey buddy, let's talk about your words here...". It's the Star Wars Episode 1 of software tools.
And then there are occasional things that just... are pretty much broken.
Why the fuck are you in here going, "oh I love this project, free rimjobs for Torvalds etc etc!" when you then spend longer bitching about its flaws than I do? Jesus man. Grab control of your own brain.
-
Status: holy beejesus, now my water heater has failed entirely. That was... bracing.
-
I am actually a fan of Git, as you may be able to tell.
When I looked last at dvcs, it seemed to me that Hg was nicer than git, but I didn't spend enough time on either for that to be more than a first impression. Hearing all the git-bashing doesn't make me want to run right out and learn it, though.
-
Are you also a fan of gimp masks and safe words?
O_o I'd be kind of worried about a person who didn't believe in safe words, if they were doing something where those are usually used. "Lockout/tagout check? nah bruh" isn't a good way to go through life.
-
water heater has failed
Huh. Well, if it came down to it you could heat water on the stove, go to a hotel, or go to a gym to get a shower.
-
When I looked last at dvcs, it seemed to me that Hg was nicer than git
I've used Hg quite a bit, and I agree with that. It lacks some of the really powerful (and therefore difficult and dangerous to use) stuff that git has. And I think it's not as suitable for really big projects. But I really like it.
-
-
-
Status: holy beejesus, now my water heater has failed entirely. That was... bracing
Sounds like your tank's lower element died as well -- this is usually due to sediment burial, so you'll want to flush all that junk out while you're working on it.
-
Dude I said I was getting a new water heater like 50 posts ago. Cripes.
-
Status: I turned myself into a cyborg-hedgehog. Only auto-likes for now, but I'm considering further upgrades...
Careful! Keep in mind what happened to Hermes once he started upgrading himself!
-
Status: I turned myself into a cyborg-hedgehog. Only auto-likes for now, but I'm considering further upgrades...
welcome to the dark side!
-
Sounds like your tank's lower element died as well -- this is usually due to sediment burial, so you'll want to flush all that junk out while you're working on it.
You've been hanzo'd on the sediment thing.
-
If you're the asshole saying "you just get used to it, WINK SHRUG!" you are part of the problem and should fuck off and go dig ditches for a living.
Amen, brother. Truer words were never spoken.
So how do I get rid of The Ribbon and make Word look sane again?
-
Bzzzt. She never changed her name, not even after every time she married (if that's what you're getting snarky at.)
Leave it to @PJH to shit all over a
good,passable, mediocre and cliched joke...
-
how do I get rid of The Ribbon
Use OpenOrrfice, LibreOffice or something like that?
make Word look sane again
Oh, then those are no solution
-
So how do I get rid of The Ribbon and make Word look sane again?
Again?
if you ask me it never looked sane!
-
This entire post reads like it's from Hyperbole and a Half.
-
It's also ironic (that's probably the wrong term; pendants, have at it!)
-
is that another Git command?
I don't know Git, remember? I was talking about disabling heavy machinery while you're working on it, so it doesn't crush/electrocute/whatever you.