Migration from Intel Mac to M1 Mac: Difference between revisions
Jump to navigation
Jump to search
mNo edit summary |
No edit summary |
||
Line 1: | Line 1: | ||
Upgrade [https://brew.sh/index_zh-tw macOS Homebrew]<ref>[https://osxdaily.com/2021/02/13/how-update-homebrew-mac/ How to Update Homebrew on Mac]</ref> | Upgrade [https://brew.sh/index_zh-tw macOS Homebrew]<ref>[https://osxdaily.com/2021/02/13/how-update-homebrew-mac/ How to Update Homebrew on Mac]</ref> | ||
Line 4: | Line 5: | ||
* {{kbd | key=brew upgrade}} to update Homebrew packages | * {{kbd | key=brew upgrade}} to update Homebrew packages | ||
Upgrade Git command<ref>[https://git-scm.com/download/mac Git - Downloading Package]</ref><ref>[https://apple.stackexchange.com/questions/433751/git-not-working-on-m1-chip-after-migration terminal - Git not working on M1 chip after migration - Ask Different]</ref> | Upgrade Git command<ref>[https://git-scm.com/download/mac Git - Downloading Package]</ref><ref>[https://apple.stackexchange.com/questions/433751/git-not-working-on-m1-chip-after-migration terminal - Git not working on M1 chip after migration - Ask Different]</ref><ref>[https://stackoverflow.com/questions/34617452/how-to-update-xcode-from-command-line How to update Xcode from command line - Stack Overflow]</ref> | ||
* {{kbd | key=which git}} to find the location where git was installed | * {{kbd | key=which git}} to find the location where git was installed | ||
* (optional) {{kbd | key=brew uninstall git}} | * (optional) {{kbd | key=brew uninstall git}} | ||
Line 10: | Line 11: | ||
* {{kbd | key=/usr/local/bin/git --version}} to verify the path is working | * {{kbd | key=/usr/local/bin/git --version}} to verify the path is working | ||
* {{kbd | key=vi ~/.zshrc}} and add this line {{kbd | key=<nowiki>alias git='/usr/local/bin/git'</nowiki>}} | * {{kbd | key=vi ~/.zshrc}} and add this line {{kbd | key=<nowiki>alias git='/usr/local/bin/git'</nowiki>}} | ||
Example outout of {{kbd | key=/usr/local/bin/git --version}} | |||
<pre> | |||
git version 2.35.1 | |||
</pre> | |||
Download & install the Command Line Tools for Xcode 13.2. | Download & install the Command Line Tools for Xcode 13.2. | ||
* [https://developer.apple.com/download/all/ More - Downloads - Apple Developer] | * Browse [https://developer.apple.com/download/all/ More - Downloads - Apple Developer], download and install Xcode 13.2 | ||
* Browse [https://developer.apple.com/download/all/ More - Downloads - Apple Developer], download and install Command Line Tools for Xcode 13.2 | |||
* {{kbd | key=/usr/bin/git --version --version}} to verify the path is working | |||
Example outout of {{kbd | key=/usr/bin/git --version}} | |||
<pre> | |||
git version 2.32.0 (Apple Git-132) | |||
</pre> | |||
== Further reading == | == Further reading == |
Revision as of 14:01, 4 March 2022
Upgrade macOS Homebrew[1]
- brew update to update Homebrew
- brew upgrade to update Homebrew packages
- which git to find the location where git was installed
- (optional) brew uninstall git
- (optional) brew install git
- /usr/local/bin/git --version to verify the path is working
- vi ~/.zshrc and add this line alias git='/usr/local/bin/git'
Example outout of /usr/local/bin/git --version
git version 2.35.1
Download & install the Command Line Tools for Xcode 13.2.
- Browse More - Downloads - Apple Developer, download and install Xcode 13.2
- Browse More - Downloads - Apple Developer, download and install Command Line Tools for Xcode 13.2
- /usr/bin/git --version --version to verify the path is working
Example outout of /usr/bin/git --version
git version 2.32.0 (Apple Git-132)