Reputation: 5407
My collaborator is having trouble with git and we have decided to work on our unity project through unity collab.
I however, push milestones to bitbucket (git) to keep track of things.
My collaborator's version is synched through unity (not the .git
files). If at some point, she needs to update the bitbucket, how do we do this as she hasn't pulled in a long long time (very different git indexed files).
If she pulls first, her changes would be lost right right? (and hers is the one we want)
if she commits with:
git add -A
git commit
and then pulls it would ask for a merge? Or give us an error?
Thanks for helping us figure out how to proceed.
Upvotes: 1
Views: 50
Reputation: 1329082
If she pulls first, her changes would be lost right right?
Actually, if the pull would overwrite files being modified, said pull would fail.
One way to ensure this is not the case is:
git config --global pull.rebase true
git config --global rebase.autostash true
That way, the work in progress is saved (stashed), local commits are replayed on top of the updated remote tracking branch and the work in progress is re-applied on top of the updated working tree.
Upvotes: 2