I am planning to write a pre commit hook. It should check whether the master branch have any versions after branching out of a file.
Example. A file abc.txt has branched out from master, on 1st Jan. Say, the branch name is BR1.X. On BR1.x branch, the file was worked till 10th Jan. On MAster branch say on 5th Jan some changes were happened. So pre commit should just give a message saying after branching out there were changes happened on master. Please help how to get these details from git?