Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

git deletes locally modified file after move during merge #12

Open
GoogleCodeExporter opened this issue Mar 31, 2016 · 0 comments
Open

Comments

@GoogleCodeExporter
Copy link

What steps will reproduce the problem?
1. git init
2. cat "initial checkin" >> readme
3. git add readme
4. git commit -m "inital checkin"
5. git branch b1
6. git co b1
7. echo "b1" >> readme
8. git add readme
9. git ci -m "b1 readme"
10. git co master
11. git mv readme readme_master
12. git ci -m "moved readme"
13. echo "master" >> readme_master
14. git merge b1 


What is the expected output? What do you see instead?
I expect to have git prevent the merge due to local changes to the file.  
Instead it overwrites the file (erasing the local modification "master") and 
you end up with:
cat readme_master
initial readme
b1

What version of the product are you using? On what operating system?
Reproduced on 1.7.9.6 and from the git-core repo 1.7.10.128.g7945c (latest as 
of this post).  This is on ubuntu 10.04.

Please provide any additional information below.

This problem only seems to occur after you check in the move, then make local 
modifications, then do the merge.

Original issue reported on code.google.com by joe.d.an...@gmail.com on 10 Apr 2012 at 11:38

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant