开发者

Is it possible to commit changes in two working directories (in the same repository) in the same commit?

开发者 https://www.devze.com 2022-12-22 06:58 出处:网络
I work against a repository that has a large number of projects. Because of this, I only check out single projects in my development environme开发者_Go百科nt. Now I\'ve made inter-connected changes in

I work against a repository that has a large number of projects. Because of this, I only check out single projects in my development environme开发者_Go百科nt. Now I've made inter-connected changes in two of these projects. So naturally, they should be in the same commit. Is this possible without checking out the entire SVN repository?

Example repository structure:

svn.example.com/huge-repository/
    project-1/
    ...
    project-101/

Example working development structure:

~/src/
    project-5/
    project-42/

I want to commit changes to both project-5 and project-42 in one commit.


You should create a sparse working copy that only contains the relevant files. This will enable you to make one commit without having to check out the entire repository.

Example:

svn checkout http://svn.example.com/huge-repository --depth empty
cd huge-repository
svn update project-5
svn update project-42

You can even use --depth empty on svn update to cherry-pick individual files or subdirectories, but by default it will get the entire folder (--depth infinity).

0

精彩评论

暂无评论...
验证码 换一张
取 消