Problem while upgrade with git.

I'm trying to upgrade my emoncms installation with this command :

cd /var/www/emoncms

sudo git pull

but i get this error :




From https//

ba42579..2ed9419 stable  -> origin/stable

ba42579..7cdbaf1 master  -> orign/master

* [new tag]  9.4                   -> 9.4

Updating ba42579..2ed9419

error : your local changes to the following files would be



Please commit your changes or stash them before you can m

in fact I have changed this files ( i remember a little modification on scripts/phpmqtt_input.php )

in order to change  the basetopic..

unfortunately I do not have the backup copy of the original files and i don't not familiar with  "git".

What should I do to continue the upgrade with git?

Thanks in advance,


Paul Reed's picture

Re: Problem while upgrade with git.

If you are happy to lose the modifications that you made;

git reset --hard

Then git pull to update.
You should not need to use 'sudo', if you do, then your file permissions may not be set up correctly.


Bill Thomson's picture

Re: Problem while upgrade with git.

On the other hand, if you want to save your changes, issue the command:

git stash


fcattaneo's picture

Re: Problem while upgrade with git.

Thanks..  i fixed the problem as your suggestion.

Unfortunately i have to use 'sudo' with 'git command'.. ; perhaps because I have done something wrong in the first installation and now the permission require root privileges.



Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.