I haven't watched the talk, but I'd like to highlight a couple of commands you mention.
"git add -p" is absolutely phenomenal. I'm probably not the only one keeping on working on something until it functions, which often means solving several issues at the same time. This command lets you add file chunks in the commit staging area, instead of entire files, up to the point where you can actually edit the patch itself. As useful as it is dangerous (it's a good way of committing invalid code).
"git commit --amend" - this works only on the last commit of the current branch, and it doesn't care whether your commit has been published or not. You might care, though, once you attempt to push your amended commit and it complains the remote can't be fast-forwarded. Extremely useful though (how many times have you forgotten to add a new file to your VCS before commit?)
I'm surprised not to see "git reflog" in the list of commands listed. Git being something of a wonderful footgun, this is a command every git user should know. It essentially records the commits you have made. Feeling bad about your last "git branch -D"? Your rebase didn't turn out so well? You need "git reflog".
I'll toss in "git whatchanged" as well. This is "git log" but with the list of files modified.
About 'git commit --amend' actually it works on any commit that hasn't been pushed upstream, the speaker talks about for some time, so the more verbose version of the command would be 'git commit --amend <SHA Hash>' but all of the previous commits are usually pushed upstream anyway, so effectively this command works only on the last commit.
I didn't know about reflog and whatchanged, I'll definitely read up on them. Thanks!
$ git commit --amend a98fd2e95dde78041132b6281f6c2127712507f5
error: pathspec 'a98fd2e95dde78041132b6281f6c2127712507f5' did not match any file(s) known to git.
$ git --version
git version 1.7.11.msysgit.1
"git add -p" is absolutely phenomenal. I'm probably not the only one keeping on working on something until it functions, which often means solving several issues at the same time. This command lets you add file chunks in the commit staging area, instead of entire files, up to the point where you can actually edit the patch itself. As useful as it is dangerous (it's a good way of committing invalid code).
"git commit --amend" - this works only on the last commit of the current branch, and it doesn't care whether your commit has been published or not. You might care, though, once you attempt to push your amended commit and it complains the remote can't be fast-forwarded. Extremely useful though (how many times have you forgotten to add a new file to your VCS before commit?)
I'm surprised not to see "git reflog" in the list of commands listed. Git being something of a wonderful footgun, this is a command every git user should know. It essentially records the commits you have made. Feeling bad about your last "git branch -D"? Your rebase didn't turn out so well? You need "git reflog".
I'll toss in "git whatchanged" as well. This is "git log" but with the list of files modified.