ERPNext Foundation ERPNext Cloud User Manual Blog Discuss Frappé* Donate

Question about editing files then updating using bench update


#1

Hi guys

lets say i edited a file then later on theres a new version that has some fix that would require me to run bench update, will the file that i edited be reverted back to the one found on github after i run bench update?


#2

If you make changes to the code and run bench update you will get a merge conflict. In that case you can stash your existing changes and then run the update.

The following thread should help you:


#3

@kennethsequeira

ive followed the instruction. but when i went to run the “git stash” command I encountered the below error message. im logged in as frappe user. Im running production

*** Please tell me who you are.

Run

git config --global user.email "you@example.com"
git config --global user.name “Your Name”

to set your account’s default identity.
Omit --global to set the identity only in this repository.

fatal: unable to auto-detect email address (got ‘frappe@server.(none)’)
Cannot save the current index state


#4

This should help:


#5

@kennethsequeira
is there a way to do this without having a github account?


#6

anyone can help me?


#7

i didnt follow the guide thoroughly and i just used the following step and was successful in updating

1.) git reset --hard
2.) bench update

is there any consequence by not doing the following after git reset hard?
git pull --rebase
git stash
git add . (Including point)


#8

1.) git reset --hard
2.) bench update

performing a git reset in the application repository or running bench update --reset removes any changes made locally to the system and overwrites it completely.

Running git stash is a way to change your local changes.

In case the changes were not required, running the update command with reset flag is a good way to go.