how can i delete git from $PATH or change path so that it no longer contains it (macOS)












0















I have recently updated git and it has changed my path to



/usr/local/git/bin:/usr/local/bin:/usr/local/sbin:/matthew/git


I try to use composer and execute files and I get the error



env: php: No such file or directory.


when I reset the path back to



export PATH="/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin"


everything works fine and composer loads but the only thing is it automatically sets the path back to /usr/local/git/bin:/usr/local/bin:/usr/local/sbin:/matthew/git in a matter of seconds after me doing what I need to do.



All my links are broken in my page that use composer and i'm stuck. I want to delete this git from the path and maybe try and install via homebrew or just use the old xcode version if this would be safer any suggestions will be greatly appreciated with this










share|improve this question

























  • How did you update Git? Did you follow any instructions? Did these instructions perhaps lead you to modify ~/.profile or anything like that?

    – Daniel B
    Jan 31 at 10:06











  • @DanielB i didn't modify profile i updated it by just installing it via there website git-scm.com as i already had a older version installed that came standard with mojave so i followed instructions on how to install git from there and it updated to newer version and changed my path what would you say my best options are here bud without having to reinstall the operating system

    – matteveli
    Jan 31 at 10:16


















0















I have recently updated git and it has changed my path to



/usr/local/git/bin:/usr/local/bin:/usr/local/sbin:/matthew/git


I try to use composer and execute files and I get the error



env: php: No such file or directory.


when I reset the path back to



export PATH="/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin"


everything works fine and composer loads but the only thing is it automatically sets the path back to /usr/local/git/bin:/usr/local/bin:/usr/local/sbin:/matthew/git in a matter of seconds after me doing what I need to do.



All my links are broken in my page that use composer and i'm stuck. I want to delete this git from the path and maybe try and install via homebrew or just use the old xcode version if this would be safer any suggestions will be greatly appreciated with this










share|improve this question

























  • How did you update Git? Did you follow any instructions? Did these instructions perhaps lead you to modify ~/.profile or anything like that?

    – Daniel B
    Jan 31 at 10:06











  • @DanielB i didn't modify profile i updated it by just installing it via there website git-scm.com as i already had a older version installed that came standard with mojave so i followed instructions on how to install git from there and it updated to newer version and changed my path what would you say my best options are here bud without having to reinstall the operating system

    – matteveli
    Jan 31 at 10:16
















0












0








0








I have recently updated git and it has changed my path to



/usr/local/git/bin:/usr/local/bin:/usr/local/sbin:/matthew/git


I try to use composer and execute files and I get the error



env: php: No such file or directory.


when I reset the path back to



export PATH="/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin"


everything works fine and composer loads but the only thing is it automatically sets the path back to /usr/local/git/bin:/usr/local/bin:/usr/local/sbin:/matthew/git in a matter of seconds after me doing what I need to do.



All my links are broken in my page that use composer and i'm stuck. I want to delete this git from the path and maybe try and install via homebrew or just use the old xcode version if this would be safer any suggestions will be greatly appreciated with this










share|improve this question
















I have recently updated git and it has changed my path to



/usr/local/git/bin:/usr/local/bin:/usr/local/sbin:/matthew/git


I try to use composer and execute files and I get the error



env: php: No such file or directory.


when I reset the path back to



export PATH="/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin"


everything works fine and composer loads but the only thing is it automatically sets the path back to /usr/local/git/bin:/usr/local/bin:/usr/local/sbin:/matthew/git in a matter of seconds after me doing what I need to do.



All my links are broken in my page that use composer and i'm stuck. I want to delete this git from the path and maybe try and install via homebrew or just use the old xcode version if this would be safer any suggestions will be greatly appreciated with this







macos bash terminal git path






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Jan 31 at 10:04









Ahmed Ashour

1,3872716




1,3872716










asked Jan 31 at 9:32









mattevelimatteveli

11




11













  • How did you update Git? Did you follow any instructions? Did these instructions perhaps lead you to modify ~/.profile or anything like that?

    – Daniel B
    Jan 31 at 10:06











  • @DanielB i didn't modify profile i updated it by just installing it via there website git-scm.com as i already had a older version installed that came standard with mojave so i followed instructions on how to install git from there and it updated to newer version and changed my path what would you say my best options are here bud without having to reinstall the operating system

    – matteveli
    Jan 31 at 10:16





















  • How did you update Git? Did you follow any instructions? Did these instructions perhaps lead you to modify ~/.profile or anything like that?

    – Daniel B
    Jan 31 at 10:06











  • @DanielB i didn't modify profile i updated it by just installing it via there website git-scm.com as i already had a older version installed that came standard with mojave so i followed instructions on how to install git from there and it updated to newer version and changed my path what would you say my best options are here bud without having to reinstall the operating system

    – matteveli
    Jan 31 at 10:16



















How did you update Git? Did you follow any instructions? Did these instructions perhaps lead you to modify ~/.profile or anything like that?

– Daniel B
Jan 31 at 10:06





How did you update Git? Did you follow any instructions? Did these instructions perhaps lead you to modify ~/.profile or anything like that?

– Daniel B
Jan 31 at 10:06













@DanielB i didn't modify profile i updated it by just installing it via there website git-scm.com as i already had a older version installed that came standard with mojave so i followed instructions on how to install git from there and it updated to newer version and changed my path what would you say my best options are here bud without having to reinstall the operating system

– matteveli
Jan 31 at 10:16







@DanielB i didn't modify profile i updated it by just installing it via there website git-scm.com as i already had a older version installed that came standard with mojave so i followed instructions on how to install git from there and it updated to newer version and changed my path what would you say my best options are here bud without having to reinstall the operating system

– matteveli
Jan 31 at 10:16












0






active

oldest

votes












Your Answer








StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "3"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1400460%2fhow-can-i-delete-git-from-path-or-change-path-so-that-it-no-longer-contains-it%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























0






active

oldest

votes








0






active

oldest

votes









active

oldest

votes






active

oldest

votes
















draft saved

draft discarded




















































Thanks for contributing an answer to Super User!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1400460%2fhow-can-i-delete-git-from-path-or-change-path-so-that-it-no-longer-contains-it%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Plaza Victoria

In PowerPoint, is there a keyboard shortcut for bulleted / numbered list?

How to put 3 figures in Latex with 2 figures side by side and 1 below these side by side images but in...