![]() ![]() Git will do an automatic or manual merge. Then User1 applies file from stash to “Local Repo 1”. User1 does Pull again and gets into “Repo Local 1” file config.txt ver A2. User1 decides to stash the file config.txt. Since file config.txt ver A1 is not committed, Git Pull will still not work. If User1 decides he does not want to commit his changes to “Remote Repo”, he releases the flag skip-worktree. Push (file config.txt ver A12 to “Remote Repo”).Resolve file merge (resulting in file config.txt ver A12). ![]() Commit file config.txt ver A1 to “Repo Local 1”.( git update-index -no-skip-worktree config.txt) Release flag skip-worktree on config.txt ver A1 in “Repo Local 1”.Now “Remote Repo” has version A12, and User1 also in “Repo Local 1” has version A12. Then it commits file A12 into “Repo Local 1”. User1 does Pull again, then automatically or manually merges config.txt into version A12. User1 decides to commit the file config.txt to “Repo Local 1”. If User1 decides he actually wants to commit his changes ver A1 to “Remote Repo”, he releases the flag skip-worktree. User1 now definitely needs to merge versions A1 and A2, just the question is if he wants to commit changes from his version A1 to the “Remote Repo”. If the user just releases a flag skip-worktree ( git update-index -no-skip-worktree config.txt), file config.txt Ver A1 will just appear UNSTAGED and UNCOMMITTED in “Repo Local 1”. User1 wanted to have the local version A1 of config.txt, but now the global version has changed to A2. The problem is that on “Repo Local 1”, we have config.txt version A1, which is modified and protected by the flag skip-worktree. Please commit your changes or stash them before you merge. Your local changes to the following files would be overwritten by merge:
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |