![]() Depending on your work style, you might have anywhere between 1 to 50 (or even more?) commits in a local feature branch. ![]() Squashing git commits is technique useful for working with teams. Photo by Vance Osterhout on Unsplash Why bother to squash git commits? Note before proceeding: I use Terminal on a Mac and the commands below are based on that. This post focuses on squashing commits on the command line. This process is simple if you’re using a remote like GitHub, which can be done with the click of a few buttons in the Pull Request UI. I probably have some left over path settings on my system from working with Ruby last year.In this short post, I’ll demystify the process to squash git commits from the command line. If anyone has some insight as to why this worked, further insight would be greatly appreciated. Then I recalled I have Homebrew installed on my Mac and ran the following: brew -version I am running OS X Mavericks version 10.9.4. I looked for /etc/path/ folder as instructed above and the directory called "path" does not exist on my Mac. dmg installer and when I restarted the terminal, still no go. I followed the README.txt instructions for upgrading to the current version 2.0.1 that comes with the. ![]() Every time I quit the terminal and restarted it, when I typed git -version the terminal, it still return the older version 1.8. I updated my terminal path by using the above mention export command. Nice! We’re safe now! And next time you can just…Īfter searching for "trouble upgrading git on mac" on Google, I read several posts and attempted the following before resolving the problem by completing step 4: Quit terminal and open a new terminal, then check version. $ sudo mv /usr/bin/git /usr/bin/git-apple IF YOU DON'T HAVE HOMEBREW, FOLLOW THESE STEPS If however you still see apple version, then type the following two lines, which will manually set our path to the local git distro instead of the Apple one. ![]() ![]() If the output of the above command shows the latest version and does not mention Apple with the version details, then you are all set. This should automatically install git and set it in your path, replacing the Apple one. It's simple if you already have Homebrew:Īssuming you have homebrew installed, type the following: brew install git ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |