假設(shè)我add了一系列文件, 我希望在寫commit注釋的時(shí)候,分別為每個(gè)文件寫commit信息.
另外由于我經(jīng)常使用Sublime,我可能希望寫commit信息時(shí)彈出Sublime的窗口
我在Google時(shí)組織的關(guān)鍵詞為git commit message for many files, 但是沒有得到理想的結(jié)果.
我的關(guān)鍵字為 "git default editor sublime Windows7",但是得到的結(jié)果非常繁瑣,在自己機(jī)器上試驗(yàn)也未能成功 這是一個(gè)坑嗎?
環(huán)境=>Windows7_64+git1.9.5+Sublime3
update:
2015-4-1
感謝各位的回答,我又在網(wǎng)上找了找信息,現(xiàn)在做一個(gè)總結(jié):
主要是對提交粒度的控制,如果粒度太小,每個(gè)文件都add和commit,會累死人的; 如果粒度過大,那么別人根本不知道某些文件是什么鬼;
所以粒度適中最好,屬于同一類的文件則同時(shí)commit,統(tǒng)一寫commit信息; 另外文件命名做到見名知意; 不要有強(qiáng)迫癥,要對自己寫的代碼和代碼注釋有信心,自己能看懂,別人也能看懂
問題2嘛=>祝福自己早日脫離win吧
I don’t have a win environment, so I can only answer your first question
Since it is a commit message, it is of course an explanation of the commit, so your idea cannot be realized unless each file is committed separately :)
Since each document has a different interpretation, can it be submitted separately?
One submission is a valid modification, and these files can share the same explanation~
Question 1
Git is not designed to comment files individually in a commit
The purpose of the commit message is to remind you what changes have been made in this commit compared to the previous version
It should not be specific about what has been changed in a certain file
If you insist on commenting on a single file
You can only commit each file separately
Question 2
Add the path of sublimeText to path
If the addition is successful, please use where subl
to test under git bash
Set sublime as default editorgit config --global core.editor "subl -w"
sublimeText2 does not have
subl.exe
要用sublime_text
代替subl