On 7 Jan 2016, at 16:13, Frank Loeffler <[email protected]> wrote:

> On Thu, Jan 07, 2016 at 10:05:12AM -0500, Erik Schnetter wrote:
>> Why should the master branch report "version 4.0"? We're way past that 
>> number.
> 
> I am sorry, that was my second mistake with git this morning, and has
> already been corrected.
> 
> What happened:
> 
> - create a new branch
> - forget that git doesn't automatically switch to it
> - commit
> - try to push (new changes -> can't)
> - merge (pull)
> - push
> - recognize my mistake (no message about a pull request)
> - revert last commit
> - push
>  -> which was my second mistake. The 'last commit' at that point
>     wasn't mine, but yours.
> 
> I know it is my fault, but git command line user interface of git wasn't
> made very user-friendly, at least not very Frank-friendly. I would
> prefer git to automatically switch to a new branch after I created it.
> That would be so intuitive (to me) that it is not the first time I
> forget that it doesn't. Most of the time I catch it before I push
> though. :/

The git command line user interface is very unfriendly.  You can create a new 
branch and check it out in a single command using

git checkout -b <new_branch> [<start point>]

(second usage of git checkout in man git checkout)

Since I usually want to check out a branch when I create it, I almost always 
use this form, rather than "git branch".

With git installed from MacPorts, I use

# Git prompt
source /opt/local/share/git/contrib/completion/git-prompt.sh
export PS1='\h:\W \u$(__git_ps1 " (%s)")\$ '

in my ~/.profile, which displays the current branch in the prompt when I am in 
a git repository.  I agree with Erik about the usefulness of GUIs for showing 
the current state.  You can get by with a few git commands which you type 
periodically, but nothing beats having everything visible all the time.

--
Ian Hinder
http://members.aei.mpg.de/ianhin

Attachment: signature.asc
Description: Message signed with OpenPGP using GPGMail

_______________________________________________
Users mailing list
[email protected]
http://cactuscode.org/mailman/listinfo/users

Reply via email to