Mac os git uninstall

Содержание
  1. How to uninstall Git from the command shell?
  2. 4 Answers 4
  3. How to uninstall Git (Apple Git-75) from Mac?
  4. 4 Answers 4
  5. just install the latest git by brew
  6. Mac os git uninstall
  7. Installation and configuration of git merge tool P4Merge under Mac os x
  8. Uninstall node under mac
  9. Uninstall Graphviz under Mac
  10. Uninstall java under mac
  11. Uninstall Idea under Mac
  12. More Recommendation
  13. Uninstall mysql under Mac
  14. Uninstall Mysql under Mac
  15. Uninstall mysql under Mac
  16. Попытка обновить Git в Mac OS X и удалить старую версию Git не удалась
  17. 3 ответа 3
  18. Короче ответ.
  19. Более длинный ответ.
  20. Интерпретация сообщения об ошибке.
  21. Исправление проблемы.
  22. brandonsimpson / reinstall_git_brew.md
  23. This comment has been minimized.
  24. yilliot commented Mar 31, 2018
  25. This comment has been minimized.
  26. kungfumike commented Jun 1, 2018
  27. This comment has been minimized.
  28. novonimo commented Dec 29, 2018 •
  29. This comment has been minimized.
  30. sidonaldson commented Mar 14, 2019
  31. This comment has been minimized.
  32. rezaabdolmaleki commented Jul 3, 2019
  33. This comment has been minimized.
  34. titoniubo commented Jul 25, 2019
  35. This comment has been minimized.
  36. peterHernandez8451 commented Sep 9, 2019
  37. This comment has been minimized.
  38. HadiYaac commented Mar 21, 2020
  39. This comment has been minimized.
  40. aonrobot commented Jul 31, 2020
  41. This comment has been minimized.
  42. peterHernandez8451 commented Aug 26, 2020
  43. This comment has been minimized.
  44. akshajmody commented Oct 12, 2020
  45. This comment has been minimized.
  46. akshajmody commented Oct 12, 2020
  47. This comment has been minimized.
  48. Georgian commented Oct 16, 2020
  49. This comment has been minimized.
  50. sjpedro commented Nov 4, 2020
  51. This comment has been minimized.
  52. johnpancoast commented Nov 24, 2020 •

How to uninstall Git from the command shell?

I currently have installed

In a previous answer How to uninstall Git? it was suggested to run the uninstall.sh , but if I run cd /usr/bin/git I get -bash: cd: /usr/bin/git: Not a directory .

Below I copied the output of ls -l on the directory usr/bin (only the files that look to me as related to git for reasons of space).

How do I uninstall git? I am trying to update to a newer version, the installer runs successfully, but when I run git —version I still get the older version. Thus I was thinking to uninstall git and reinstall from scratch, not sure if this is the right approach tho.

4 Answers 4

Do not uninstall Apple-distributed Git. You can leave it as it is and run another version by having it in a directory earlier in PATH environment variable.

The easiest way to install another version on OS X would be to use Homebrew packet manager.

After installing it, you can run:

Homebrew ( brew ) will take care of all dependencies and configure the latest Git version, however there is still a chance it will find a setting it cannot resolve automatically, so read what Homebrew says at the end.

Packages installed with brew do not interfere with system-preinstalled packages. It installs packages under /usr/local/Cellar directory and puts executables in /usr/local/bin , so you just have to keep it in PATH variable in before /usr/bin .

Источник

How to uninstall Git (Apple Git-75) from Mac?

I am unable to install Git from my Mac. I am running MacOS Sierra. I have tried all solutions available, but can’t seem to figure out how to install Git from my Mac.

Here is the screenshot of the version of Git installed on my Mac.

4 Answers 4

just install the latest git by brew

the new git version will replace apple git as default

There’s nothing for you to do. The git you refer to is a part of the operating system. It’s not user-installable. You do not want to un-install it.

If you want a different version, install it using e.g MacPorts or homebrew and use port select git or brew link , respectively, to choose the preferred version.

I had the exact same problem today. I wanted to use the latest git version as default instead of Apple Git. After a couple of hours, here is what helped me —

  1. Install latest (or whichever you want) version of git
  2. Make note of the location where new git binary got downloaded. In my case, it got downloaded at /usr/local/git/bin/git

Backup Apple Git binary to some location (just in case)

$ sudo cp /Applications/Xcode.app/Contents/Developer/usr/bin/git /tmp/git-apple

Overwrite system’s git with above downloaded git binary

Источник

Mac os git uninstall

Installation and configuration of git merge tool P4Merge under Mac os x

Download and install We use P4Merge, this tool is very easy to use and is a free tool. The tool P4Merge can run on all mainstream platforms. Download P4Merge,please click here. After opening the link.

Uninstall node under mac

Using npm package management tool under node, npm install repeatedly reports errors, guessing is part of the npm install installation package, such as .node is the domestic network wall, but this part.

Uninstall Graphviz under Mac

I plan to install this program, but I heard that this software has problems on the Mac, so first record the uninstall method. method one: When you double-click the pkg file, when you see the installer.

Uninstall java under mac

1. you can first use the following command to find the java path 2. In the «Terminal» window, copy and paste commands: 3. Delete java java files under the folder path. carry out.

Uninstall Idea under Mac

First drag idea into the trash Delete the following files.

More Recommendation

Uninstall mysql under Mac

Through a list of commands, execute them one by one, return to the system preferences and find that the mysql logo is gone, happy You can go to /urs/local/ to see if there is a mysql file with the nam.

Uninstall Mysql under Mac

Today, when I used Eclipse to knock on the program, I found that MySQL had an unpredictable error (I didn’t touch it, it was broken—), and I couldn’t connect to the database. Then the MySQL in the pr.

Uninstall mysql under Mac

Enter the following command to uninstallmysql:.

Источник

Попытка обновить Git в Mac OS X и удалить старую версию Git не удалась

Я пытаюсь обновить git на моем Mac OS X 10.8.5 (Mountain Lion).

Я скачал эту новую версию по этой ссылке, дважды щелкнул на .dmg а затем перетащил uninstall.sh в свой терминал (следуя инструкциям там), чтобы удалить старую версию, и я получил:

Обратите внимание, что git в настоящее время установлен на моем компьютере.

Почему я не могу удалить? Как я могу обновить git ?

3 ответа 3

На Mac самый простой способ — использовать доморощенный.

  1. Установить варку
  2. Следуйте инструкциям ( brew doctor скажет вам обновить ваш $PATH с помощью /usr/local/bin:$PATH
  3. brew install git

И перестаньте беспокоиться о ручном обновлении, просто запускайте brew update && brew upgrade каждый раз

Почему вы не можете установить существующий:

  • У Apple есть установка git по умолчанию, которую использует XCode (при условии, что вы установили XCode или, по крайней мере, утилиты командной строки)

Короче ответ.

Нет необходимости удалять XCit git вы видите в Mac OS X. Просто добавьте /usr/local/git/bin в ваш $PATH , отредактировав

/.bash_profile чтобы добавить export PATH например так:

Затем закройте и сохраните этот файл и загрузите его в ваш сеанс терминала, набрав:

И недавно установленный git будет доступен вам в предпочтении перед уже установленным git .

Более длинный ответ.

Интерпретация сообщения об ошибке.

Проблему можно понять, посмотрев на содержимое uninstall.sh Bash скрипт , который поставляется с официального пакета Git инсталлятор для Mac OS X , чтобы увидеть именно то , что он делает. Вот фрагмент в верхней части, который выдает ошибку, которую вы видите:

Обратите внимание на строку, if [ ! -r «/usr/local/git» ]; then скрипт Bash проверяет наличие этого пути к каталогу:

Но когда вы запустили which git path, путь к каталогу у вас был:

Это означает, что официальный установщик устанавливает git его элементы в /usr/local/git/ а не в основной каталог Mac OS X /usr/bin/ .

Тогда что это за другая версия git вы уже используете? Давайте проверим вывод git —version для более подробной информации:

Вы видите это (Apple Git-31.1) ? Это указывает, что это было установлено Apple. А поскольку git не является частью основной настройки Mac OS X, единственный способ установить его можно было через Xcode и соответствующие двоичные файлы командной строки.

Короче говоря, вы не можете и не должны пытаться удалить версию git для Xcode. Вместо этого вы хотите, чтобы ваш Терминал поддерживал двоичные файлы git установленные в /usr/local/git/bin/ поверх основных двоичных файлов Mac OS X в /usr/bin/ . И вы можете сделать это, изменив настройку $PATH в

/.bash_profile следующим образом.

Исправление проблемы.

/.bash_profile в текстовом редакторе. Я предпочитаю делать это прямо в командной строке, используя nano вот так:

Теперь, если в этом export $PATH нет

/.bash_profile , просто добавьте в файл строку $PATH например, так:

Если там существует export $PATH , внесите изменение в это значение, чтобы /usr/local/git/bin был перед основным $PATH системы. Обратите внимание : разделитель.

Теперь закройте и сохраните этот файл и загрузите его в сеанс терминала, например, набрав:

Теперь, если вы введете:

Выход должен быть:

Это означает, что ваш терминал $PATH теперь будет проверять в /usr/local/git/bin/ перед тем, как перейти к проверке других каталогов в значениях $PATH по умолчанию для двоичного git .

Таким образом, не удаляя версию git для Xcode, вы можете скачать и установить официальный и обновленный бинарный файл git и использовать его, не имея отношения к Homebrew или чему-либо еще. Например, в моей системе это текущий вывод git —version :

Нет (Apple Git-31.1) в поле зрения. Просто чистый номер версии git который обновлен и готов к использованию благодаря этой настройке $PATH .

Источник

brandonsimpson / reinstall_git_brew.md

Re-installing Git on Mac OSX with Brew

This is helpful if you’ve previously installed git from source on OSX, and other compilers can’t find the correct path. You need to remove the current version of git, then re-install with brew.

Uninstall git if installed manually

Check which git you’re running:

output should be similar to this: /usr/bin/git

Remove that git install

Re-install git with brew

Check which git you’re now running:

Should now say: /usr/local/bin/git

This comment has been minimized.

Copy link Quote reply

yilliot commented Mar 31, 2018

sudo rm -rf /usr/bin/git wont work for El Capitan due to SIP restriction

simple solution is create alias

This comment has been minimized.

Copy link Quote reply

kungfumike commented Jun 1, 2018

This comment has been minimized.

Copy link Quote reply

novonimo commented Dec 29, 2018 •

consider that for change in bin folder (which is read-only) you must disable SIP System Intergradation Protection in your mac:
1- reboot your mac
2- press and hold ⌘ R until seeing the apple’s logo
3- from recovery menu utils>Terminal

csrutil disable
reboot

now you can remove bin’s stuff
note that: after this change re-enables it using this command:
csrutil enable

This comment has been minimized.

Copy link Quote reply

sidonaldson commented Mar 14, 2019

sudo rm -rf /usr/bin/git wont work for El Capitan due to SIP restriction

simple solution is create alias

brew does this anyways 🙂

This comment has been minimized.

Copy link Quote reply

rezaabdolmaleki commented Jul 3, 2019

that’s great. working for me. thanks 😉

This comment has been minimized.

Copy link Quote reply

titoniubo commented Jul 25, 2019

I follow the instructions and then I am being requested to enter a password.

I do enter the password, but I get an error message:

Thanks for your help.

This comment has been minimized.

Copy link Quote reply

peterHernandez8451 commented Sep 9, 2019

I have gone through the steps you listed in this instruction set, however once I run the «sudo rm -rf /usr/bin/git/» I get the error

rm: /usr/bin/git: Operation not permitted

I am currently running MacOS Mojave v.10.14.6.

and I have Xcode installed (if that means anything).

Please advise.
-Pete8451

This comment has been minimized.

Copy link Quote reply

HadiYaac commented Mar 21, 2020

I have gone through the steps you listed in this instruction set, however once I run the «sudo rm -rf /usr/bin/git/» I get the error

rm: /usr/bin/git: Operation not permitted

I am currently running MacOS Mojave v.10.14.6.

and I have Xcode installed (if that means anything).

Did you found out a solution for your problem?? I got the same error «Operation not permitted» and I’ve been struggling for days with this problem

This comment has been minimized.

Copy link Quote reply

aonrobot commented Jul 31, 2020

I have gone through the steps you listed in this instruction set, however once I run the «sudo rm -rf /usr/bin/git/» I get the error
rm: /usr/bin/git: Operation not permitted
I am currently running MacOS Mojave v.10.14.6.
and I have Xcode installed (if that means anything).
Please advise.
-Pete8451

Did you found out a solution for your problem?? I got the same error «Operation not permitted» and I’ve been struggling for days with this problem

This comment has been minimized.

Copy link Quote reply

peterHernandez8451 commented Aug 26, 2020

Hey people! I was able to get this issue resolved. However i had to install manually (not using brew initially).

I followed the steps from the Git website to reinstall Git.
https://git-scm.com/book/en/v2/Getting-Started-Installing-Git
It automatically updated the git version i had on my Mac. Having XCode on my device did not effect the install. I know this may seem broad, but it worked for me!! hope this helps!

This comment has been minimized.

Copy link Quote reply

akshajmody commented Oct 12, 2020

Hi guys, I am having a similar issue. I checked my git version and it was 2.23.0, I did brew install git which should have updated to 2.28.0 I believe however when I restarted my mac and checked git version I still see 2.23.0. I checked which git and it shows «/usr/local/bin/git». How do I know if I am using the right git on my system?

This comment has been minimized.

Copy link Quote reply

akshajmody commented Oct 12, 2020

This comment has been minimized.

Copy link Quote reply

Georgian commented Oct 16, 2020

rm: /usr/bin/git: Operation not permitted is because Mac’s «System Integrity Protection».

This comment has been minimized.

Copy link Quote reply

sjpedro commented Nov 4, 2020

Hey people! I was able to get this issue resolved. However i had to install manually (not using brew initially).

I followed the steps from the Git website to reinstall Git.
https://git-scm.com/book/en/v2/Getting-Started-Installing-Git
It automatically updated the git version i had on my Mac. Having XCode on my device did not effect the install. I know this may seem broad, but it worked for me!! hope this helps!

this worked for me — now running: git version 2.27.0 Catalina 10.15.7

This comment has been minimized.

Copy link Quote reply

johnpancoast commented Nov 24, 2020 •

Hi guys, I am having a similar issue. I checked my git version and it was 2.23.0, I did brew install git which should have updated to 2.28.0 I believe however when I restarted my mac and checked git version I still see 2.23.0. I checked which git and it shows «/usr/local/bin/git». How do I know if I am using the right git on my system?

IMPORTANT EDIT — Any solution I wrote in this comment should be ignored unless you’ve already done the following: restarted your terminal after running brew install git (important!), ensured which git is returning /usr/local/bin/git and that this is what brew installed, confirmed /usr/local/bin/git —version is displaying the new version installed via brew, and if git —version is still returning the old Xcode version even after restarting your terminal then you can either use simple workarounds to add the path to the proper git install as others and myself mentioned (shown below this edit) or you can use people’s solutions above to remove Xcode’ git . However it’s unlikely any of this is necessary with newer versions of macOS if you’ve restarted the terminal after installing git with homebrew. For details see @martbe’s comment and my comment below it that explains where confusion can happen after installing git with homebrew alongside Xcode’s git. For newer versions of macOS, the problem that myself and possibly others experienced is due to simply not restarting the terminal after running brew install git .

See above edit before reading further.

If you do which -a git you’ll notice there are multiple versions of git installed assuming you have one installed from XCode (or straight from git) and another that you’ve just installed from homebrew.

The one in /usr/local/bin/git is the one from homebrew which you can confirm with ls -al /usr/local/bin/git and you’ll see it’s symlinked to the git binary installed in homebrew’s Cellar directory. You can alternatively confirm by passing —version to each absolute command path to see which is which.

When you run a non-absolute command like git it will search directories in the $PATH environment variable and use the first command it finds so you should run echo $PATH and ensure that /usr/local/bin comes before /usr/bin , and if it does then running git should run the correct command for you. Btw, macOS sets up the $PATH variable this way by default but if you’ve changed your $PATH just ensure that /usr/local/bin comes first.

If the above is true and $PATH is correct but git —version is still running the /usr/bin/git command then the quickest and simplest fixes are to either:

    Set an alias like somebody else said by adding alias git=»/usr/local/bin/git» to

/.bash_aliases .

  • Add the correct git command to $PATH by adding export PATH=$PATH:/usr/local/bin/git
  • If that case is happening where $PATH is correctly loading from /usr/local/bin first but git is still running the /usr/bin/git command, I think this may have to do with Xcode overriding things but somebody else who’s more knowledgeable of Xcode can confirm this since I’m not sure. I’ve just seen odd things like this before, and it would explain some of these weird cases (and I know Xcode has things like xcrun to find tools). I’m just not sure. EditThis could also be related to @martbe’s point about reloading terminal, even for older versions, not sure. I’m leaving this be now lol. I’ve done enough damage!

    Источник

    Читайте также:  Symantec partition magic для windows 10
    Оцените статью