Question about editing files then updating using bench update

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?

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:

@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

This should help:

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

anyone can help me?

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)

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.

I am late to this party, but I am facing same problem now. And what I think might be the best solution is to just export custom fields and then migrate after update.