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

Minor Issue - maybe use git mv #2

Open
drstrangelooker opened this issue Aug 27, 2020 · 0 comments
Open

Minor Issue - maybe use git mv #2

drstrangelooker opened this issue Aug 27, 2020 · 0 comments

Comments

@drstrangelooker
Copy link

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.

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

No branches or pull requests

1 participant