开发者

Git auto diff in some external text file

Sorry for my English ;)

I want to make something like auto-diff. For example, Im writing an article and want to paste there all my changes in project code. I hate writing code, then copy-pasting it to text editor, writing comments, then writing code again.

Can somebody advic开发者_开发技巧e me any way to do smth like this:

  • I edit my some user.rb file (in this step i want all changes to be written in some changes.txt)
  • Then i edit README file (in this step all changes in README should be written to changes.txt too)
  • And then I refactor code in user.rb (in this step new changes in user.rb should be written to changes.txt below any changes. i should see all my changes to user.rb file)

Somebody understood what i want? ;)


I don't know what exactly you want if you want the logic then here what i can suggest. what i understood is like you have some project,you made some changes, now you want some difference file to generate & patch it back.

first You have to maintain an Original Copy of the project.

you can create a Xml file where each tag will be having id like your filename.content of tag whatever the output of the Diff command comes

Use of XML will make your work easier to edit the file latter on. Now you can use any programming language java,c# to write & read from the XML, & see some better algorithm for finding difference & patching it back.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜