简体   繁体   中英

Does git-svn handle moved files

Git doesn't explicitely track copied or moved files, but detect them for example with git log --follow . When using Git on an SVN Repo and pushing my changes with git svn dcommit , will SVN recognize those as copied files?

git-svn will properly reference the file history if it can detect the link at the time you git svn dcommit . If the only thing you do is move the file, it will work as expected and the SVN server will link file A to file B in its history.

However, if you also modify the file then squash the two commits before pushing them to SVN, then git may not properly guess that the file was renamed and you will get a deleted file and a newly created file with no apparent relationship in the SVN repository.

You mean to get an entry in SVN Log like the following:

   A /xxxx/xyz (from /xxxx/zzzz.xxx:5555)

Yes you get such a thing.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM