News for hackers. Stuff that matters.
Re:Mercurial developer responds to "Switch to git?" by matwood on Sunday November 17, 2013 @08:26PM (#6751976)
My normal workflow with git is through the cli. Cli really is the best way to use it since git is good at prodding you along to do the right thing. Make sure to go find a good set of aliases and turn on git prompt.

When I need to look at histories or large change sets I'll open up SourceTree or go to the BitBucket repos. If I need to see the file history of a single file gitk -p -- file is the quickest way that I have found.

I'm currently dealing with 2 projects that are similar and share code but are in different repos. Git has made it easy to add remotes to each project and cherry pick commits that need to be shared. As someone who started with VSS years ago, Git continues to amaze me with how easy it makes source wrangling.

Re:Mercurial developer responds to "Switch to git?" by hrjet on Sunday November 17, 2013 @11:05PM (#6752452)
What is "git prompt" and how do I turn it on? A quick search didn't reveal anything.
Re:Mercurial developer responds to "Switch to git?" by matwood on Monday November 18, 2013 @10:26AM (#6754708)
Add this to wherever you setup your bash prompt:

source /usr/local/git/contrib/completion/git-prompt.sh

source /usr/local/git/contrib/completion/git-completion.bash

GIT_PS1_SHOWDIRTYSTATE=true

export PS1='\u@\h \[\033[01;34m\]\w\[\033[00m\]$(__git_ps1 "\[\033[01;33m\](%s)\[\033[00m\]")$ '

source ~/.profile

What this does is add a git style prompt anytime you are in a directory managed by git. On the prompt it will show your current branch, what state it is in (+'s/*'s show if you have changes), if your are merging/rebasing/cherry-picking/etc...

The source files may live in slightly different places on your machine depending on where you installed git.

This above also adds tab completion for git commands, branches, tags, etc...

Also, see my .gitconfig for aliases I have put together from various places on the net:

https://github.com/matwood/cfg/blob/master/.gitconfig

Re:Mercurial developer responds to "Switch to git?" by riannucci on Sunday November 17, 2013 @11:37PM (#6752563)
I think the parent is meaning something like the git-status integration of e.g. oh-my-zsh [0], or something like the 'official' git-status integration script for bash [1]

(I've used the former, but not the latter.)

[0] https://github.com/robbyrussell/oh-my-zsh [1] https://raw.github.com/git/git/master/contrib/completion/git...