Git normally tries to detect when a file is moved, but there is always a possibility that moving a file will get be seen by git as deleting a file and creating a new one. This can make a merge with a branch where the file wasn't moved problematic. For example if another developer makes a change to the file in a branch where the file wasn't moved, git won't know where to merge those changes. The file is gone. Git can apply the change, then delete the file, or delete the file and discard the change.
The command git mv can be used to move a file AND record that the move occurred in git. So git will know that a change made to random.view.lkml should be merged with views/random.view.lookml.
In this context it probably doesn't matter, and it will make the script a little more complex. But it is worth thinking about.
Git normally tries to detect when a file is moved, but there is always a possibility that moving a file will get be seen by git as deleting a file and creating a new one. This can make a merge with a branch where the file wasn't moved problematic. For example if another developer makes a change to the file in a branch where the file wasn't moved, git won't know where to merge those changes. The file is gone. Git can apply the change, then delete the file, or delete the file and discard the change.
The command
git mvcan be used to move a file AND record that the move occurred in git. So git will know that a change made torandom.view.lkmlshould be merged withviews/random.view.lookml.In this context it probably doesn't matter, and it will make the script a little more complex. But it is worth thinking about.