Inspired by a Gist from kevinelliott - thanks!
Install from App Store
- Xcode - for command line tools required by Homebrew
Install from Third-Party Websites
Xcode Command Line Tools
- Benhorgen's answer is not entirely wrong. While there is a mono version of Git Extensions (v2.51 line) that does run just fine on Linux, it was my experience that even this mono version of GitExt doesn't work correctly on Mac (app crashes). It may be possible to resolve these issues but I don't believe there is any quick-and-easy path to getting it working.
- The following example uses a GitHub host, but you can use any Git host for version control in Visual Studio for Mac. To set up a Git repository, execute the following steps: Create a new Git repo at github.com: Set Repo Name, description, and privacy. Do not initialize Repo. Set.gitignore and license to.
- Remember the most common way to interact with git is through the terminal window, so open a new terminal window to continue. On this system, when I open a terminal window and type the word “git” for the first time, the following output results. JohnFarllsiMac2: patrick$ git.
- My Rec ommendation for SourceTree. My Recommendation for SourceTree.
Need to be installed for all the fne stuff in the latest section
Xcode > Preferences > Downloads > Command Line Tools
Git How To is a guided tour that walks through the fundamentals of Git, inspired by the premise that to know a thing is to do it. The surest path to mastering Git is to immerse oneself in its utilities and operations, to experience it first-hand.
or
Run Xcode and accept the license! Homebrew can not install properly until this occurs.
Install Homebrew
If this is not a fresh install of Homebrew, go ahead and purge the complete installation first:
Now install Homebrew
Install common libraries via Homebrew
Install Cask application manager
Install applications via Homebrew Cask
The following software is still in testing and not part of my default setup:
Install Chrome extensions
Some extensions are not pulled from your Google account, so re-install theam manully now:
Firefox profiles
TODO make sure the profiles are registered
After setting all the preferences, you need to reboot or at least restart Finder:
If you are curious, check this file for more possible settings.
Setup Github
Docker
Database
Git Extensions Portable
Ruby & Gems
Prepare a sandboxed ruby environment
within we install some gems
Vagrant and plugins
Install custom .dotfiles at the end, cause we utilize some of the previously installed packages
Back to listWhile Mercurial has a well defined (albeit internal) API that can be used to write extensions that extend the functionality of Mercurial, git's extension model follows the Unix philosophy of composing small, simple programs to achieve a similar effect. What that means is that git 'extensions' can be written in any language and by following a few simple rules it's still possible to add commands that appear as if they were built-in.
![Git Git](/uploads/1/1/8/5/118599489/158458020.jpg)
Example: git activity
To see the activity on all the branches in a repository I've implemented a
git activity
command. git activity shows the latest commit on every branch, sorted by recency.It shows the following output when executed in the Rails repository:
The script is written in bash and fairly straightforward. We set up colours and parse some command line options the scripts supports (e.g. to turn off colors, to limit the output) and then run
git for-each-ref
to output information about each ref.The important rules to follow to make this script available as a git sub-command are:
- It should be named
git-COMMANDNAME
, in this case it's called git-activity - and it needs to be executable and available on the
$PATH
In my example the customgit-activity
script is in the/usr/local/bin
directory but it can be in any directory that is on the$PATH
:
Providing a manual/help page
If the custom command has an accompanying man page, the git help command will show the help information as well. E.g. the man page for the activity command is located in
/usr/local/share/man/man1/git-activity.1
and can be show by either man git-activity
or git help activity
.The
manpath
command can be used to show the locations the system uses to locate man pages:The output for
git help activity
is (using https://bitbucket.org/ssaasen/git-pastiche/src/master/man/git-activity.1):Bonus tip Man pages can easily be generated from Markdown using Pandoc:
Conclusion
By following a couple of simple rules and by embracing the Unix model of composing functionality out of small, focused programs and scripts, it turns out that it is surprisingly easy to extend git's functionality and making custom commands part of the git command suite.
More extensions
Git Ext
The source for
git-activity
and a few other commands can be found here: https://bitbucket.org/ssaasen/git-pasticheGit Extension For Mac
Other additional git commands can be found here: