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

**URL:** <https://discourse.mailinabox.email/t/please-commit-your-changes-or-stash-them-before-you-switch-branches/17113>\
**Category:** Help with Setup/Upgrade\
**Created:** [October 29, 2026, 4:37pm UTC](https://discourse.mailinabox.email/t/please-commit-your-changes-or-stash-them-before-you-switch-branches/17113 "2026-10-29T16:37:27Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![terrytokyo](https://discourse.mailinabox.email/letter_avatar_proxy/v4/letter/t/8c91f0/32.png) [@terrytokyo](https://discourse.mailinabox.email/u/terrytokyo)\
**Post date:** [October 29, 2026, 4:37pm UTC](https://discourse.mailinabox.email/t/please-commit-your-changes-or-stash-them-before-you-switch-branches/17113/1 "2026-10-29T16:37:27Z")

</div>

Hello

I am trying to upgrade my MIAB to V-latest.

I recall some time ago there was a need to make a minor change to the html in management/templates/aliases.html to eradicate a display issue…

Now when i try to run _**“curl -s [https://mailinabox.email/setup.sh](https://mailinabox.email/setup.sh) | sudo bash”**_ to upgrade to the recently released version with the php fixes, i get this error:

_**ubuntu@box:~$ curl -s [https://mailinabox.email/setup.sh](https://mailinabox.email/setup.sh) | sudo bash  
Updating Mail-in-a-Box to v78 . . .  
remote: Enumerating objects: 1, done.  
remote: Counting objects: 100% (1/1), done.  
remote: Total 1 (delta 0), reused 1 (delta 0), pack-reused 0 (from 0)  
Unpacking objects: 100% (1/1), 364 bytes | 364.00 KiB/s, done.  
error: Your local changes to the following files would be overwritten by checkout:  
management/templates/aliases.html  
Please commit your changes or stash them before you switch branches.  
Aborting  
Update failed. Did you modify something in /root/mailinabox?**_

My /usr/local/bin/mailinabox yields:

_**ubuntu@box:~/mailinabox$ cat /usr/local/bin/mailinabox  
#!/bin/bash  
cd /root/mailinabox  
source setup/start.sh**_

Is there a known workaround for this to force the updade to run please?

By the way, I am running v75 and want to jump to v78: _**A new version of Mail-in-a-Box is available. You are running version v75. The latest version is v78. For upgrade instructions, see [https://mailinabox.email](https://mailinabox.email).**_

Cheers

Terry

---

<div class="post-metadata">

**Author:** ![OtaD](https://discourse.mailinabox.email/letter_avatar_proxy/v4/letter/o/3da27b/32.png) [@OtaD](https://discourse.mailinabox.email/u/OtaD)\
**Post date:** [October 29, 2026, 5:23pm UTC](https://discourse.mailinabox.email/t/please-commit-your-changes-or-stash-them-before-you-switch-branches/17113/2 "2026-10-29T17:23:55Z")

</div>

> [@terrytokyo](#):
>
> management/templates/aliases.html

Hello,  
Yes, the mentioned change to “management/templates/aliases.html”  
prevents the update.  
(I had the original file saved, so I simply copied it back.)  
After that, the update proceeded without any issues.

---

<div class="post-metadata">

**Author:** ![OtaD](https://discourse.mailinabox.email/letter_avatar_proxy/v4/letter/o/3da27b/32.png) [@OtaD](https://discourse.mailinabox.email/u/OtaD)\
**Post date:** [October 29, 2026, 5:55pm UTC](https://discourse.mailinabox.email/t/please-commit-your-changes-or-stash-them-before-you-switch-branches/17113/3 "2026-10-29T17:55:33Z")

</div>

Were possible solutions discussed here? :

> [@MIAB v75 fails to update to v76](https://discourse.mailinabox.email/t/miab-v75-fails-to-update-to-v76/16528/2):
>
> It looks like you modified a file following [this topic.](https://discourse.mailinabox.email/t/webinterface-issues-after-v75-update/16375) There’s a solution to this update to be found there as well (see [https://discourse.mailinabox.email/t/v75-upgrade-issue-scratching-head/16408](https://discourse.mailinabox.email/t/v75-upgrade-issue-scratching-head/16408))

---

<div class="post-metadata">

**Author:** ![terrytokyo](https://discourse.mailinabox.email/letter_avatar_proxy/v4/letter/t/8c91f0/32.png) [@terrytokyo](https://discourse.mailinabox.email/u/terrytokyo)\
**Post date:** [October 29, 2026, 8:10pm UTC](https://discourse.mailinabox.email/t/please-commit-your-changes-or-stash-them-before-you-switch-branches/17113/4 "2026-10-29T20:10:38Z")

</div>

I also tried that before i blogged about the issue but it didn’t resolve.

BOX-xxxxx-COM ubuntu@box:~/mailinabox$ git status  
fatal: detected dubious ownership in repository at ‘/home/ubuntu/mailinabox’  
To add an exception for this directory, call:

```auto
git config --global --add safe.directory /home/ubuntu/mailinabox

```

BOX-xxxxx ubuntu@box:~/mailinabox$

I’m a bit lost on what to do here

---

<div class="post-metadata">

**Author:** ![terrytokyo](https://discourse.mailinabox.email/letter_avatar_proxy/v4/letter/t/8c91f0/32.png) [@terrytokyo](https://discourse.mailinabox.email/u/terrytokyo)\
**Post date:** [October 29, 2026, 8:23pm UTC](https://discourse.mailinabox.email/t/please-commit-your-changes-or-stash-them-before-you-switch-branches/17113/5 "2026-10-29T20:23:04Z")

</div>

I guess the other question is… is there a got command i can issue that will pull the aliases.hmtl file down from the GIT for V75 and overwrite the one the upgrade thinks is suspicious? I’m happier to do that as ill then upgrade to latest which fixes the issue?

---

<div class="post-metadata">

**Author:** ![OtaD](https://discourse.mailinabox.email/letter_avatar_proxy/v4/letter/o/3da27b/32.png) [@OtaD](https://discourse.mailinabox.email/u/OtaD)\
**Post date:** [October 29, 2026, 8:40pm UTC](https://discourse.mailinabox.email/t/please-commit-your-changes-or-stash-them-before-you-switch-branches/17113/6 "2026-10-29T20:40:24Z")

</div>

wget [mailinabox/management/templates/aliases.html at main · mail-in-a-box/mailinabox · GitHub](https://github.com/mail-in-a-box/mailinabox/blob/main/management/templates/aliases.html) ?

---

<div class="post-metadata">

**Author:** ![KiekerJan](https://discourse.mailinabox.email/user_avatar/discourse.mailinabox.email/kiekerjan/32/2339_2.png) [@KiekerJan](https://discourse.mailinabox.email/u/KiekerJan)\
**Post date:** [October 29, 2026, 10:17pm UTC](https://discourse.mailinabox.email/t/please-commit-your-changes-or-stash-them-before-you-switch-branches/17113/7 "2026-10-29T22:17:23Z")

</div>

You can check what changes git sees by running git status in the /root/mailinabox folder. If you’re satisfied you’re not losing anything, run `git reset --hard HEAD` This will reset your local git repository

---

<div class="post-metadata">

**Author:** ![terrytokyo](https://discourse.mailinabox.email/letter_avatar_proxy/v4/letter/t/8c91f0/32.png) [@terrytokyo](https://discourse.mailinabox.email/u/terrytokyo)\
**Post date:** [October 30, 2026, 12:42am UTC](https://discourse.mailinabox.email/t/please-commit-your-changes-or-stash-them-before-you-switch-branches/17113/8 "2026-10-30T00:42:29Z")

</div>

Ahhh KiekerJan, you are a genius whoever and wherever you are. 👋 from Auckland New Zealand.

Your advice worked perfectly and now my server is on V78. Right, time to upgrade the next one!!

Thank you!
