How to set the default behavior of file on editing In Visual Studio?

You can set the behavior in Visual Studio menu Tools->Options->Source Control->Environment->On Edit dropdown list.