git - Pulling with GitHub? -


the remote repository newer version local repository, , have made changes local repository. how merge two? when try "git pull origin master", gives me "commit changes or stash them" error.

is there anyway merge easily?

you have few options:

  1. if you're done local changes, go ahead , commit them. then, when git pull origin master, git merge remote changes local ones, or ask merge manually if cannot.

  2. if you're not quite done you're working on locally, can git stash, "stashes" changes away temporarily. once that, can git pull origin master, reapply changes using git stash pop. again, if there merge conflicts, need handle them yourself.

  3. if you're ok tossing out local changes, git checkout . , pull down remote. needless say, lose whatever working on locally.


Comments

Popular posts from this blog

facebook - android ACTION_SEND to share with specific application only -

python - Creating a new virtualenv gives a permissions error -

javascript - cocos2d-js draw circle not instantly -