Prevent GitHub for Windows from adding emoticons to my initial commit message

拈花ヽ惹草 提交于 2019-12-07 06:12:33

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!