How can I solve the "cannot merge" problem?remote: Counting objects: 21, done.
remote: Compressing objects: 100% (11/11), done.
remote: Total 11 (delta 9), reused 1 (delta 0)
Unpacking objects: 100% (11/11), done.
From git://gitorious.org/tmw-eathena-data/mainline
48ecf1f..e095298 master -> origin/master
Updating 9b3da22..e095298
conf/atcommand_athena.conf: needs update
conf/lan_support.conf: needs update
npc/001-1_Tulimshar/_import.txt: needs update
npc/002-3_Desert_mines/_import.txt: needs update
npc/007-1_Woodland/_import.txt: needs update
npc/008-1_Hurnscald_outskirts/_import.txt: needs update
npc/028-1/_import.txt: needs update
error: Entry 'npc/007-1_Woodland/_import.txt' not uptodate. Cannot merge.
Git pull help
Git pull help
Hi all. This morning when I entered into my eathena-data directory and did a git pull I got this message:
TMW Blog: http://charlestmw.blogspot.com/
Re: Git pull help
Do you have local changes to this file? Git can not pull a new revision of a file when you have uncommitted changes to it.
You can try to merge your local changes with the new changes by using the "stash" command to save them and reset your files to the last commt. Then you can pull the new commits and use "stash apply" to apply your saved changes back. The complete workflow is:
When you don't want your local changes anymore and you want to overwrite them, you can use
When everything else fails, just delete (move) the file and then do a pull.
Please be aware that I am not a git guru. I am also struggling with Git from time to time. So please take everything I write with a grain of salt.
You can try to merge your local changes with the new changes by using the "stash" command to save them and reset your files to the last commt. Then you can pull the new commits and use "stash apply" to apply your saved changes back. The complete workflow is:
Code: Select all
git stash
git pull
git stash apply
Code: Select all
git reset HEAD --hard
git pull
Please be aware that I am not a git guru. I am also struggling with Git from time to time. So please take everything I write with a grain of salt.
- former Manasource Programmer
- former TMW Pixel artist
- NOT a game master
Please do not send me any inquiries regarding player accounts on TMW.
You might have heard a certain rumor about me. This rumor is completely false. You might also have heard the other rumor about me. This rumor is 100% accurate.
Re: Git pull help
Using pop instead of apply would be better in most cases. The only difference is that apply keeps it in the stash stack while pop doesn't.
Code: Select all
git stash pop
Re: Git pull help
Thank you Crush, I still ran into a bit of a problem because I created a file (voltain.txt) that used to exist. When I moved it out of the directory and ran the stash and pull everything worked 100% and my changes got re-applied to my server.Crush wrote:The complete workflow is:Code: Select all
git stash git pull git stash apply
TMW Blog: http://charlestmw.blogspot.com/