开发者

SVN: Move pending changes to a new branch

Source code has local modifications that must not be committed to the trunk, but rather to a branch that does not yet exist.

This is what svn info shows:

Pfad: .
URL: svn://10.8.0.1/fx_dev
Basis des Projektarchivs: svn://10.8.0.1/fx_dev
UUID des Projektarchivs: 6279aca8-1485-11de-bcb4-29f147300bdb
Revision: 859
K开发者_Python百科notentyp: Verzeichnis
Plan: normal
Letzter Autor: andy_svn
Letzte geänderte Rev: 859
Letztes Änderungsdatum: 2010-12-02 15:08:11 +0100 (Do, 02. Dez 2010)

(It's German, but I guess you still understand it)

How can I create a branch and move the pending changes onto that branch?


Create a branch via

svn copy URL/trunk URL/branches/B_NAME -m"- New Branch"

make an

svn switch URL/branches/B_NAME

and then commit your changes.

This works because the copy happens on the server, not the client. The svn switch command will not overwrite changes locally when switching over to the new branch.


Pretty much everything you ever need to know about SVN is in the red book (linked). Unless you have a specific question, maybe saying what you have tried already, it is what you should refer to.

Create a branch

http://svnbook.red-bean.com/en/1.1/ch04s02.html#svn-ch-4-sect-2.1

the svn switch command

http://svnbook.red-bean.com/en/1.0/re27.html


I got the problem now: The server-side directory structure was completely wrong and missing the TTB (trunk, tags, branches) directories. I changed that and now everything's fine!

I didn't know trunk, tags and branches were actual directories in the repo everybody could add and delete, I always thought they were immutably provided by SVN.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜