Read the statement by Michael Teeuw here.
issues updating MMM-calendar EXT3
- 
 @sdetweil Correct. After executing “git reset package-lock.json”, I get the message “Unstaged changes after reset: 
 M package-lock.json”I then run git pull and get 
 pi@MagicMirror:~/MagicMirror/modules/MMM-CalendarExt3 $ git pullUpdating e93534d…5f276d4 
 error: Your local changes to the following files would be overwritten by merge:
 package-lock.json
 Please commit your changes or stash them before you merge.
 Aborting
- 
 @nschertz sorry, oops… wrong command! git checkout package-lock.jsonfixed the prior posts with note edited 
- 
 to clarify… execute “git checkout package.json” instead of " git reset package.json" or execute “git checkout package.json” and " git reset package.json"? 
- 
 @nschertz git checkout restores it from the local source repo git reset 
 removes it from the staged to be submitted as a changeI posted the checkout first, then a user posted reset and I blindly followed it… 
 my mistake
- 
 oops meant to type to clarify… execute “git checkout package-lock.json” instead of " git reset package-lock.json" or execute “git checkout package-lock.json” and " git reset package-lock.json"? 
- 
 Got it ! git checkout… worked! Thanks for the clarification on what git reset does verses git checkout. 
- 
 @nschertz awesome… sorry for the misdirection 
- 
 in the git model the files you see are called the working directory 
 and the repo is hidden in the .git folderthat is where the actual ‘state’/contents of each file exists so checkout copies the contents from the repo to the working directory if you were developing and had a change 
 git status would show changed files in the working directorygit diff will show WHAT changed on each file to lock it down in the local copy of the repo 
 you git add it to a potential ‘commit’,
 then git status shows it as ‘staged’to REMOVE it from staged, use the git reset command git commit puts it into the local repo as a change then you ‘push’ your entire local repo to the parent (git remote -v) and the changes (if accepted) are merged and that change is in the master for 
 all new ‘pulls’
- 
 @sdetweil thank you ! This explanation is very helpful. I’m still a little new to the git environment. 
- 
S sdetweil has marked this topic as solved on
