Bench update showing error

@alec_ruizramon1 , Sir I am getting error while running git stash command ,

 ommi@ommi:~$ cd /home/ommi/frappe-bench/apps/erpnext/erpnext
ommi@ommi:~/frappe-bench/apps/erpnext/erpnext$ git add .
ommi@ommi:~/frappe-bench/apps/erpnext/erpnext$ git stash

*** 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 'ommi@ommi.(none)')
Cannot save the current index state
ommi@ommi:~/frappe-bench/apps/erpnext/erpnext$ 

Please help

1 Like

@alec_ruizramon1 . Thanks a lot sir , I signed in and then no issues but I did

git add .
git stash

then updated bench without any error

finally when running git stash apply I am getting this error

ommi@ommi:~$ cd /home/ommi/frappe-bench/apps/erpnext/erpnext
ommi@ommi:~/frappe-bench/apps/erpnext/erpnext$ git stash applyerpnext/selling/doctype/quotation/quotation.json: needs merge
erpnext/stock/doctype/item/item.json: needs merge
unable to refresh index

Please help

1 Like

Navigate to apps/erpnext/erpnext/stock/doctype/item and open item.json, there you will see the merge conflicts denoted with <<<<<<< in the file.

Resolve them and then git add . , git commit, and continue!

1 Like

@alec_ruizramon1 . Sir I am a novice please guide me , I am not able to make out what you are telling . Please explain me , what do you mean by the word resolve , how to resolve ?

Please help

1 Like

When you open up the file, you will see merge conflicts → this means that both you and someone else edited the same part of the file.

It looks like this:
<<<<<<<<
Some changes

Some other changes

You need to chose which of the two changes to keep, and delete the rest. When you save the file after choosing all the changes and deleting the <<<. ===, >>> and unwanted changes, it’s said to be ‘resolved’.

1 Like

@alec_ruizramon1 . Thanks for quick response Sir ,What ever the changes I did to the item doc disappeared , now if I resolve will I get back all those custom fields back ?

1 Like

The fields are stored in the stash then. Not in custom field.

Send me a PM I can resolve this for you.

1 Like

Thank you sir

1 Like

Thank you so much @alec_ruizramon1 . Solved thanks

1 Like