I recently upgraded from a MacBook Pro 2017 with an Intel i7 processor to a MacBook Air 2023 with Apple’s M3 processor. Little did I know that making this switch would trigger issues with the apps I used on my Intel-based laptop. I quickly learned that most applications are developed to work on Intel chips (Intel app) and not always on Apple Silicon (Universal app), a newer processor first released in 2020. This incompatibility also affected the development environment I was used to working with on my older MacBook Pro. My main issues were getting Git to run in my terminal properly and then getting GitHub synced up to my new MacBook. I also had trouble finding the exact solution to my problem in the usual troubleshooting forums so I am providing the steps I took to remedy this here:
1. Git Commands Showing Error in the Terminal
After migrating my data from my old MacBook to my new one using Migration Assistant, I wanted to verify that everything was migrated properly and that my new computer was set up for my usual workflow. I decided to open a local test repo for which I have a corresponding repo in GitHub. After editing the html file with minor changes I tried committing the changes using the git status
and git commit
commands. For every git command I entered into the terminal, I got the following error:
2. Identifying the Problem
I looked up what this error message meant and I gathered that there was something about where and how Git was installed on my new MacBook that was not properly formatted for my Apple Silicon-based computer.
3. Reinstalling Git via Xcode Command Line Tools
From what I read, it seemed like maybe reinstalling Git which is bundled with Apple’s Xcode Command Line Tools may fix the solution. This would, not only potentially switch the software to an Apple Silicon compatible version, but would also update it to its latest version. I signed into the Apple Developer site and downloaded and installed the latest version of Command Line Tools. I then tried committing my changes and again I received the same Git error.
4. Installing Rosetta 2
The next two potential solutions I identified from different threads and Google AI were to either uninstall Git and then reinstall it, which would require me to uninstall Xcode Command Line Tools and then reinstall it. OR try installing Rosetta 2 which translates apps with x86_64 (aka Intel specific) instructions to work on Apple Silicon. (This is all a bit out of scope from my expertise in web-based development, so I took this as a learning moment - The More You Know!⭐).
I decided to try Rosetta 2 first because I figured it may prove to be the quickest solution if it works and because there was no easy uninstall option for XCode Command Line Tools. After a successful install, I retried submitting some git commands, and SUCCESS! I was able to add changes to the queue and commit those changes. But then I hit another snag, I was unable to push those changes to GitHub.
5. Getting GitHub Connected via SSH
I started receiving an authentication error stating my GitHub username and password were invalid. So I thought that maybe my SSH connection with GitHub was changed due to the migration so I followed the steps to re-establish it. This resulted in the command line telling me that the repo was already connected.
I then looked into other authentication issues I may have been experiencing and it turns out that my Personal Access Token was expired. So I created a new one, originally with HTTPS but this didn’t seem to work and I realized this was the recommended step if you’re developing APIs which I am not for most of my personal projects. So then I deleted that token and created another one via SSH. And Voila! I was able to sign in and push my changes to the GitHub repo.
6. Reauthorizing GitHub to work with VS Code
I then tested out some code changes in VS Code and I noticed that some of the icons I usually see in VS Code that notify a user of version control modifications were not displaying. I also looked at the GitHub extension and saw that I was no longer seeing any issues from an open-source project I have been working on. I figured out that while other authentications migrated to my new MacBook my GitHub account connection with VS Code did not. So I re-established my connection by signing in on VS Code and started to see all the issues from the open-source repo. I then refreshed the app and noticed that the icons like 'M' for modified were now displayed next to the updated file.
So after all these steps, I was eventually able to get my usual dev setup working like I like it to. I hope this can serve as a quick guide for anyone who may have experienced similar issues when upgrading their MacBook from an Intel chip to one with an M chip. While these hiccups did occur when transitioning over, overall I am generally happy with my new MacBook. It’s quick and can handle a lot of processing at once. Looking forward to developing more on this new machine.
If you're a Mac user, have you had any issues upgrading to Apple Silicon? Or are there other methods I should have considered? Let me know in the comments.
Top comments (0)