query regarding git merge

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,
I am confused with git merge working.

Suppose I have these 3 files in master branch-
a.txt
b.txt
d.txt

I create a branch, add c.txt to it and commit. So its final contents 
are-
a.txt
b.txt
c.txt
d.txt

Then, I checkout master branch, delete a.txt, add e.txt and commit. So 
final contents are-
b.txt
d.txt
e.txt

Now when I merge branch in master,
its result is-
b.txt
c.txt
d.txt
e.txt

Now suppose in branch, a.txt was needed for its working. And in master 
branch's latest commit a.txt was removed because maybe it wasn't needed 
or it was introducing bugs.
Now, git merge removes that a.txt
So now branch functionality wouldn't work. 
Isn't that wrong??

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]