I'm still learning the dark arts of programming. I'm OK on the programming side, but now I'm struggling to push it to GitHub before I pull it into Engine Yard.
I've made changes, Git sees the changes, but when I commit, I get the following errors:
Command failed: git commit -m Updates
fatal: could not open '.git/COMMIT_EDITMSG': Permission denied
Or, when I try and change branch I get:
error: Your local changes to the following files would be overwritten by checkout:
app/views/shared/_footer.html.erb
app/views/plans/index.html.erb
Please, commit your changes or stash them before you can switch branches.
Aborting
I can't commit, and then I'm back to square 1.
I've googled it, but don't really understand the answers.
The first error you get might be a bug in Gitbox. You should try GitX (download link) instead.
The second one is pretty clear: when your working copy is "dirty" (i.e., you have uncommitted changes), changing branch is impossible. The easiest is to stash them, the stash being a stack of modification where you can push (before changing branch) and pop (after).