开发者

Local history / revisions for development files

In eclipse you have local history, I was wondering if there is some software that can keep track of file history similar to this but without using eclipse.

Basically I want to be able to track my history and view it from any editor for PHP projects.

I'm already using SVN version control but I wish to have 开发者_运维知识库local history also.


I was about to ask a similar question, which I reproduce here for search purposes (the answer is below) :


I have a working copy of the source of a project using subversion. Now, suppose I have two different issues to fix on the same file while I don't have access to the svn server for whatever reason. I don't want the two fixes to be mixed up in a global patch : for the sake of clarity I would like to have a patch for each fix. So I would like to be able to "svn diff" between the original revision, the firstly modified revision and the last revision, which have not been committed to the server — or alternatively said, to be able to commit each revision independently.

How do you do that ? Is there a way to flag revisions locally with svn ?


Then I found this question and maverick's reply triggered a new keyword : "clone". Looking for "svn clone" I found out that a good answer could be to use "git-svn" (NB : a dash for the name, but no dash for the command : "git svn"), then use git locally. I let you google on that, but to make things short :

git svn --username=skippy clone http://svn.example.org/projects/myproject -T trunk localdir

Apply first patch :

git add path/to/modified/file
git commit

Apply second patch :

git add path/to/modified/file
git commit

Then get your revision IDs :

git log --oneline|head

And to see modifications added by revision a1b2c3 :

git diff a1b2c3d{^,}
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜