Move to Another Changelist

Move to Another Changelist

Move to Another Changelist 將選中的文件轉移到其他的 Change list 中。 Change list 是一個重要的概念,這裏需要進行重點說明。很多時候,我們開發一個項目同時併發的任務可能有很多,每個任務涉及到的文件可能都是基於業務來講的。 所以就會存在一個這樣的情況:我改了 30 個文件,其中 15 個文件是屬於訂單問題,剩下 15 個是會員問題,那我希望提交代碼的時候是根據業務區分這些文件的, 這樣我填寫 Commit Message 是好描述的,同時在文件多的情況下,我也好區分這些要提交的文件業務模塊。 所以我一般會把屬於訂單的 15 個文件轉移到其他的 Change list中,先把專注點集中在 15 個會員問題的文件,先提交會員問題的 Change list,然後在提交訂單會員的 Change list。 我個人還有一種用法是把一些文件暫時不提交的文件轉移到一個我指定的 Change list,等後面我覺得有必要提交了,再做提交操作,這樣這些文件就不會干擾我當前修改的文件提交。 總結下 Change list 的功能就是爲了讓你更好地管理你的版本控制文件,讓你的專注點得到更好的集中,從而提供效率。

將選中的文件轉移到其他的 Change list 中。
Change list 是一個重要的概念,這裏需要進行重點說明。很多時候,我們開發一個項目同時併發的任務可能有很多,每個任務涉及到的文件可能都是基於業務來講的。
所以就會存在一個這樣的情況:我改了 30 個文件,其中 15 個文件是屬於訂單問題,剩下 15 個是會員問題,那我希望提交代碼的時候是根據業務區分這些文件的, 這樣我填寫 Commit Message 是好描述的,同時在文件多的情況下,
我也好區分這些要提交的文件業務模塊。

所以我一般會把屬於訂單的 15 個文件轉移到其他的 Change list中,先把專注點集中在 15 個會員問題的文件,先提交會員問題的 Change list,然後在提交訂單會員的 Change list。
我個人還有一種用法是把一些文件暫時不提交的文件轉移到一個我指定的 Change list,等後面我覺得有必要提交了,再做提交操作,這樣這些文件就不會干擾我當前修改的文件提交。

總結下 Change list 的功能就是爲了讓你更好地管理你的版本控制文件,讓你的專注點得到更好的集中,從而提供效率。

http://wiki.jikexueyuan.com/project/intellij-idea-tutorial/vcs-introduce.html

Changelist

A changelist is a set of changes in files that represents a logical change in source code. The changes specified in a changelist are not stored in the repository until committed (pushed).

Any changes made to the source files, are automatically included in the active changelist. Initially, the Default changelist is active, but you can make any other changelist active. The active changelist is displayed on top of the Version Control tool window, with the name being highlighted in bold font.

In addition to the Default changelist, you can create new changelists, delete existing ones (except for the Default changelist), and move files between changelists.

All modified, deleted, unversioned and other files are managed in the Version Control tool window. From this window you can:

Commit (push) changelists.
Create new changelists (if you want to keep an eye on certain files and changes).
Remove existing changelists and set the default changelists.
Rollback modified files in changelists.
Add the unversioned files and directories to the version control.
Move files between changelists.
Show differences on selected files.
Refresh the list of VCS changes.
Jump to the source code from within a changelist.
Shelve (stash) and unshelve (unstash) changes.

https://www.jetbrains.com/help/idea/2016.2/changelist.html

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章