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

[Question] What to do for this git pull error? #5487

Closed
avexus opened this issue Sep 16, 2016 · 7 comments
Closed

[Question] What to do for this git pull error? #5487

avexus opened this issue Sep 16, 2016 · 7 comments

Comments

@avexus
Copy link

avexus commented Sep 16, 2016

I must accidentally changed a file. Now how can I discard the change and get from the repository?

remote: Counting objects: 23, done.
remote: Compressing objects: 100% (23/23), done.
remote: Total 23 (delta 10), reused 0 (delta 0), pack-reused 0
Unpacking objects: 100% (23/23), done.
From https://github.com/PokemonGoF/PokemonGo-Bot
5ae0afc..14d1939 dev -> origin/dev
Updating 11123a8..a8ee312
error: Your local changes to the following files would be overwritten by merge:
pokemongo_bot/metrics.py
Please commit your changes or stash them before you can merge.
Aborting
Requirement already up-to-date: numpy==1.11.0 in d:\p\python27\lib\site-packages (from -r requirements.txt (line 1))

@mszoernyi
Copy link

mszoernyi commented Sep 16, 2016

if you don't care about your changes git reset --hard and then rerun your command.

if you care git stash (puts them aside)
then do your command
if you need your changes back (git stash pop)

@avexus
Copy link
Author

avexus commented Sep 16, 2016

I don't care about the changes, didn't know how they got there in the first place. after I ran the reset (I am using master branch, is that a problem?)
I got this:

ws_server.py | 2 +-
65 files changed, 3494 insertions(+), 1825 deletions(-)
create mode 100644 .gitattributes
create mode 100644 configs/config.json.hunter.example
create mode 100644 docs/telegramtask.md
create mode 100644 pokemongo_bot/cell_workers/discord_task.py
create mode 100644 pokemongo_bot/cell_workers/pokemon_hunter.py
delete mode 100644 pokemongo_bot/event_handlers/colored_logging_handler.py
create mode 100644 pokemongo_bot/event_handlers/discord_handler.py
mode change 100755 => 100644 pokemongo_bot/event_handlers/telegram_handler.py
create mode 100644 pokemongo_bot/test/polyline_walker_test.py
create mode 100755 web.sh
error: Your local changes to the following files would be overwritten by checkout:
config/userdata.js.example
Please commit your changes or stash them before you can switch branches.
Aborting
Unable to checkout 'bd5c2548eadc74de19aca239efefd065b260f4f4' in submodule path 'web'
Requirement already up-to-date: numpy==1.11.0 in d:\p\python27\lib\site-packages (from -r requirements.txt (line 1))
Requirement already up-to-date: networkx==1.11 in d:\p\python27\lib\site-packages (from -r requirements.txt (line 2))
Obtaining pgoapi from git+https://github.com/pogodevorg/pgoapi.git/@5e550f656b318227f021801c796b8a80ad917b93#egg=pgoapi (from -r requirements.txt (line 3))
git clone in e:\master\src\pgoapi exists with URL https://github.com/joelgreen/pgoapi.git/
The plan is to install the git repository https://github.com/pogodevorg/pgoapi.git/
What to do? (s)witch, (i)gnore, (w)ipe, (b)ackup

@RedViper9
Copy link
Contributor

RedViper9 commented Sep 16, 2016

If you are on master do this:

git fetch --all
git reset --hard origin/master
git pull origin master

If you are on dev, replace master with dev in the above.

Then do the usual update from requirements.txt and update the submodule.

@avexus
Copy link
Author

avexus commented Sep 16, 2016

Thank you very much @RedViper9
after these 3 lines, do i still need the following?
git submodule update --init --recursive
pip2 install -r requirements.txt --upgrade

@davidspeijer
Copy link

You can also just remove the edited file and it will be downloaded with a new pull

@avexus
Copy link
Author

avexus commented Sep 16, 2016

Also, which option should I use?
It seems I have a lot of questions...

(s), (i), (w), or (b)?

Many thanks in advance.

Requirement already up-to-date: networkx==1.11 in .....\python27\lib\site-packages (from -r requirements.txt (line 2))
Obtaining pgoapi from git+https://github.com/pogodevorg/pgoapi.git/@5e550f656b318227f021801c796b8a80ad917b93#egg=pgoapi (from -r requirements.txt (line 3))
git clone in ......\master\src\pgoapi exists with URL https://github.com/joelgreen/pgoapi.git/
The plan is to install the git repository https://github.com/pogodevorg/pgoapi.git/
What to do? (s)witch, (i)gnore, (w)ipe, (b)ackup

@avexus
Copy link
Author

avexus commented Sep 17, 2016

well, if the update does not work, we always have an option of reinstalling the whole thing.

@avexus avexus closed this as completed Sep 17, 2016
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

4 participants