I want to understand what git looks for when merging with two different code.
When does it delete code or insert
So if I have code
Foo.java (this is my code)
class Foo { void hello(){} void bye(){} void gone(){} } Foo.java (the code being fetched and merged)
class Foo{ void hello(){} void wait(){} void bye(){} } If I merge the above code, will this
- Does it delete gone and bye method?
- If there was changes were made inside hello method, does it delete my 'hello' and rewrites it with the fetched hello?
Foo.javalook like?