Git Refresher

I’m going through the online version of Pro Git by Scott Chacon. The entire thing is online, and it’s very good. Here are a few takeaways:

  • Git was created in 2005! It’s not that old.
  • The typical workflow is EditStageCommit.
  • > To remove a file from Git, you have to remove it from your tracked files (more accurately, remove it from your staging area) and then commit. The git rm command does that and also removes the file from your working directory so you don’t see it as an untracked file next time around.

— via Chapter 2

I had trouble with that in the past, where I’d delete a file in the system but it would persistently display during staging. It makes sense: running git rm will stage a file to be deleted. * It’s useful to rename and relocate files through git using git mv. * Branching is git’s big deal. And it’s pretty sweet. * rebase is powerful, but avoid using it remotely.