commit

Git error: Your local changes to the following files would be overwritten by checkout

When you get the Git checkout error, “Your local changes to the following files would be overwritten by checkout,” one likely cause is that files in the master branch are indeed newer than the files in your feature branch.

But another possibility that I just learned about is that you did a git add, but forgot to do a git commit before trying to switch branches. My current wrong/accidental workflow looks like this:

How-to: Steps to create a Github pull request (git branch, etc.)

I haven’t worked on many open source projects, so my ability to fork a Github project, pull it down, create a branch, push that branch back, and then submit a pull request are weak, at best.

That being said, I’ve done it a few times lately, so I’m getting better at it. Today was a very smooth process, so I thought I’d make these notes while they’re still fresh in my mind.

Git shortcuts/aliases - How to create

Git shortcuts FAQ: Can I create Git shortcuts (aliases) so I don't have to type out full Git commands like "git commit..."?

I've been reading the Pro Git book a lot lately, and the short answer is yes, you can create Git shortcuts so you don't have to type out the long Git commands. Here are several Git shortcut commands (referred to as "git aliases") from the Pro Git book:

svn commit command - how to commit changes with svn

Here's a quick example of an svn commit command in what I think is a very typical scenario. Assuming that I just made a few changes to some files in a directory, to commit those changes back to the repository, I just issue an "svn commit" command like this, incuding a nice svn commit message:

svn commit --message "Enabling build processes to support multiple platforms"

(Don't forget -- a good SVN commit message can really help you out later. I find it helps to say both what I did, and why I did it.)