1

I had a file at following location

/c/projects/myproject/app/code/local/Myproject/Shipping/controllers/Adminhtml/Matrixrate/ConfigController.php

I deleted it using rm command on Git bash and recreated on following location using touch command

/c/projects/myproject/app/code/local/Myproject/Shipping/controllers/Adminhtml/Multipletablerates222/Matrixrate/ConfigController.php

Now when I use git status command it shows the file as renamed file and after commiting in the bitbucket I get message

app/code/local/Myproject/Shipping/controllers/Adminhtml/ { → Multipletablerates222 } /Matrixrate/ConfigController.php (94% similar)

Will there be any problem if I merge my branch to my master branch?

Mukesh
  • 7,630
  • 21
  • 105
  • 159

1 Answers1

2

There won't be a problem if you merge. When someone checkouts your commit the same file will be moved and the same changes that you applied to the file will be applied.

If you want to make it clear what happened add a meaningful commit message explaining that you deleted the old file and created a new one.

If you really want to make it obvious you can make a separate commit just of the deletion of the file and then commit the new file and its changes in a separate commit.

Git thinks the file was moved because the similarity index between the two files is high, which is 94% in your case. If you want to know more about the similarity index and how to adjust its threshold see: How can I prevent git from thinking I did a rename

Community
  • 1
  • 1
Ma3x
  • 5,761
  • 2
  • 17
  • 22