问题
I'm new to git, and to GitHub. I'm using the GitHub for Windows program on Windows 7 64-bit. What I dislike is that when I create a new local repository, the initial change where the .gitattributes
file is added is given a commit message containing an emoticon (seemingly chosen at random).
Here is a screencap of this problem in action: http://i.stack.imgur.com/sXVkv.gif
The emoticon in the above example was "confetti ball": http://i.stack.imgur.com/ePYdv.png
How do I prevent this emoticon? Or at least, how do I prevent the inital change from being automatically committed so that I have the opportunity to edit the commit message to remove the emoticon?
Even though I'd prefer to interact with the program's GUI, I have enough practice with the command line that if the fix for this issue requires using it, I'm comfortable with that.
Any help for this would be much appreciated.
回答1:
git commit --amend
, then edit the commit message, then
git push origin master --force
(if the initial commit was also pushed behind your back)
来源:https://stackoverflow.com/questions/27033983/prevent-github-for-windows-from-adding-emoticons-to-my-initial-commit-message