Error: Your local changes to the following files would be overwritten by checkout


#1

Hi,

I want to update my instance to the latest version of mastodon (v2.7.0), but I get this error

error: Your local changes to the following files would be overwritten by checkout:

app/javascript/mastodon/features/getting_started/index.js

app/views/layouts/public.html.haml

Please commit your changes or stash them before you switch branches.

Aborting

Its right, I did some changes on those files but I have them saved on my local machine and I’m gonna replace them again after the upgrade is done?

I’m not sure how I should proceed here, so I little would be awsome. Thanks.


#2
git stash
git checkout v2.7.0
git stash pop

#3
mastodon@dedi-par-72088:~/live$ 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: empty ident name (for <mastodon@sd-72088.dedibox.fr>) not allowed

#4

Still need some help here.

That’s what I tried.

mastodon@dedi-par-72088:~/live$ git config --global user.name "forrumro"
mastodon@dedi-par-72088:~/live$ git stash
Saved working directory and index state WIP on (no branch): 887f9de6d Bump version to 2.6.5
mastodon@dedi-par-72088:~/live$ git checkout v2.7.0
Previous HEAD position was 887f9de6d Bump version to 2.6.5
HEAD is now at 31e7940de Fix multiple workers for the same scheduled status being queueable (#9875)
mastodon@dedi-par-72088:~/live$ git stash pop
Auto-merging app/views/layouts/public.html.haml
Auto-merging app/javascript/mastodon/features/getting_started/index.js
HEAD detached at v2.7.0
Changes not staged for commit:
  (use "git add <file>..." to update what will be committed)
  (use "git checkout -- <file>..." to discard changes in working directory)

	modified:   app/javascript/images/icon_grade.svg
	modified:   app/javascript/images/logo.svg
	modified:   app/javascript/images/logo_alt.svg
	modified:   app/javascript/images/logo_full.svg
	modified:   app/javascript/images/logo_transparent.svg
	modified:   app/javascript/mastodon/features/getting_started/index.js
	modified:   app/views/about/_links.html.haml
	modified:   app/views/about/show.html.haml
	modified:   app/views/layouts/public.html.haml
	modified:   public/android-chrome-192x192.png
	modified:   public/apple-touch-icon.png
	modified:   public/badge.png
	modified:   public/favicon.ico
	modified:   public/mask-icon.svg
	modified:   public/mstile-150x150.png
	modified:   public/web-push-icon_favourite.png

no changes added to commit (use "git add" and/or "git commit -a")
Dropped refs/stash@{0} (feb4bf3a46f047c753c9ca369d9c06cb0850fab7)
mastodon@dedi-par-72088:~/live$ git fetch --tags
remote: Enumerating objects: 9, done.
remote: Counting objects: 100% (9/9), done.
remote: Compressing objects: 100% (8/8), done.
remote: Total 9 (delta 4), reused 3 (delta 1), pack-reused 0
Unpacking objects: 100% (9/9), done.
From https://github.com/tootsuite/mastodon
 + a14bdf1ad...0b58b8643 dependabot/bundler/paperclip-6.1.0 -> origin/dependabot/bundler/paperclip-6.1.0  (forced update)
   d50e82416..306e1572e  master     -> origin/master
mastodon@dedi-par-72088:~/live$ git checkout v2.7.0
M	app/javascript/images/icon_grade.svg
M	app/javascript/images/logo.svg
M	app/javascript/images/logo_alt.svg
M	app/javascript/images/logo_full.svg
M	app/javascript/images/logo_transparent.svg
M	app/javascript/mastodon/features/getting_started/index.js
M	app/views/about/_links.html.haml
M	app/views/about/show.html.haml
M	app/views/layouts/public.html.haml
M	public/android-chrome-192x192.png
M	public/apple-touch-icon.png
M	public/badge.png
M	public/favicon.ico
M	public/mask-icon.svg
M	public/mstile-150x150.png
M	public/web-push-icon_favourite.png
HEAD is now at 31e7940de Fix multiple workers for the same scheduled status being queueable (#9875)
mastodon@dedi-par-72088:~/live$ RAILS_ENV=production bundle exec rails assets:precompile
rbenv: version `2.6.0' is not installed (set by /home/mastodon/live/.ruby-version)
mastodon@dedi-par-72088:~/live$ git fetch --tags
mastodon@dedi-par-72088:~/live$ git checkout v2.7.0
M	app/javascript/images/icon_grade.svg
M	app/javascript/images/logo.svg
M	app/javascript/images/logo_alt.svg
M	app/javascript/images/logo_full.svg
M	app/javascript/images/logo_transparent.svg
M	app/javascript/mastodon/features/getting_started/index.js
M	app/views/about/_links.html.haml
M	app/views/about/show.html.haml
M	app/views/layouts/public.html.haml
M	public/android-chrome-192x192.png
M	public/apple-touch-icon.png
M	public/badge.png
M	public/favicon.ico
M	public/mask-icon.svg
M	public/mstile-150x150.png
M	public/web-push-icon_favourite.png
HEAD is now at 31e7940de Fix multiple workers for the same scheduled status being queueable (#9875)
mastodon@dedi-par-72088:~/live$ RAILS_ENV=production bundle exec rails assets:precompile
rbenv: version `2.6.0' is not installed (set by /home/mastodon/live/.ruby-version)