I’m a heavy git user, hence I’m always trying to improve my workflow while using it. I normally have 3 ways of using git. I could use a gui client (sourcetree), normally I do this when I’m preparing a new release.
On my daily code day I would use git inside Sublime Text 2. That way I don’t need to constantly change between my text editor of choice and a git gui or the terminal. However, from time to time, I use just the terminal. That happens for two reasons, one I could be using git remotely, or I could be doing something more difficult that couldn’t be resolved inside sourcetree or Sublime Text.
Yesterday I tried this new tool and I’m getting quite found of it. It’s called Git Extras. You have 3 ways of getting it:
Clone / Tarball:
$ make install
$ (cd /tmp && git clone --depth 1 https://github.com/visionmedia/git-extras.git && cd git-extras && sudo make install)
$ sudo port install git-extras
$ brew install git-extras
Here’s a small screencast on how to use it.
This tool is specially useful when you’re managing .gitignore files. Or when you want to know all the info about your repo. You just have to type git info and you’ll get something like this:
$ git info ## Remote URLs: origin email@example.com:sampleAuthor/git-extras.git (fetch) origin firstname.lastname@example.org:sampleAuthor/git-extras.git (push) ## Remote Branches: origin/HEAD -> origin/master origin/myBranch ## Local Branches: myBranch * master ## Most Recent Commit: commit e3952df2c172c6f3eb533d8d0b1a6c77250769a7 Author: Sample Author <sampleAuthor@gmail.com> Added git-info command. Type 'git log' for more commits, or 'git show <commit id>' for full commit details. ## Configuration (.git/config): color.diff=auto color.status=auto color.branch=auto user.name=Sample Author user.email=sampleAuthor@gmail.com core.repositoryformatversion=0 core.filemode=true core.bare=false core.logallrefupdates=true core.ignorecase=true remote.origin.fetch=+refs/heads/*:refs/remotes/origin/* email@example.com:mub/git-extras.git branch.master.remote=origin branch.master.merge=refs/heads/master