Get a “git command not found” error on mac though .profile file is updated

I have read this thread when I got the the
git: command not found (on OS X 10.5)
error

which basically said to update ~/.profile file with this phrase:

  • Continuous integration with python 2.7 / flask / mongoDB / git
  • Error pushing to github
  • git status shows a file that I have listed explicitly in my .gitignore file
  • Is it OK to use `git push` to restore a remote repository?
  • Git p4 merge pull request
  • Is it possible to migrate from subversion to git keeping history of copied branches, tags and trunk?
  • export PATH=$PATH:/usr/local/git/bin
    

    I did that and it didn’t work. but if I just write this code in the terminal the “git” command did work – but only until I have closed the terminal – then I need to retype this code whenever I want git to work.

    My suspicious is that I have another “.profile” file somewhere in my mac and that the file I have updated is irrelevant (since it didn’t work).

    Is that the case and if so – how do I find this file?

  • List of authors in git since a given commit
  • How to get back to a specific time of version of a file in Git?
  • Is it posssilbe to do a selective “git checkout --ours” on only take “ours” in the conflicted regions of the conflict file
  • git: How can I merge my working file with the latest one
  • Finding out the version of git on remote server
  • “Git stash apply” all files, except one
  • One Solution collect form web for “Get a “git command not found” error on mac though .profile file is updated”

    Add this line to your ~/.bash_profile file:

    source ~/.profile
    

    This excellent super user answer explains why:
    Difference between .bashrc and .bash_profile

    Git Baby is a git and github fan, let's start git clone.