version control - Accurate git commits -


if have code like

/**  * blah blah blah  */ ...some codes... /**  * yadda yadda 

and add

/**  * blah blah blah  */ ...some codes... /**  * blah blah blah  */ ...some codes... 

before "yadda yadda" commanet, git diff show added:

 +  * blah blah blah  +  */  +  ...some codes...  + /** 

is there way tell git, "hey, that's not right. try again."? know of --patience seems git diff , life of me never works correctly. know it's no super important, makes diffs , commit logs, on github, more clean.

the way git stores files in repository on whole-file basis. when ask difference between 2 versions, git retrieves both complete files repository1, , runs diff algorithm between them. unlike other source control systems, git not calculate or store differences between files @ time of commit.

this method has advantage of changing behaviour of diff @ time ask it. example, have seen --patience flag uses different diff algorithm determine (possibly) better patch between 2 files.

because of way files stored in git repository, not possible tell git somehow keep track of custom diff alignment.

  1. deep down in git repository, inside .pack files, git uses various delta encoding methods store differences between similar objects , reduce size of repository. however, on lower level file storage , not actual diffs between source files.

Comments

Popular posts from this blog

image - ClassNotFoundException when add a prebuilt apk into system.img in android -

I need to import mysql 5.1 to 5.5? -

Java, Hibernate, MySQL - store UTC date-time -