chicken-hackers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Chicken-hackers] small patch


From: Peter Bex
Subject: Re: [Chicken-hackers] small patch
Date: Sat, 23 May 2015 16:45:05 +0200
User-agent: Mutt/1.5.21 (2010-09-15)

On Fri, May 15, 2015 at 02:25:56PM +0200, "Jörg F. Wittenberger" wrote:
> Attached a small patch against origin/master.  It's just to silence a
> valgrind warning.

The patch looks good to me, except for the headers.  See below.

> More important: I'd like to eventually learn how to get this right using
> git.

It looks like you forgot to configure your username and e-mail address
in git.  It says "From: Benutzer <address@hidden>".  You can
configure this through:

git config --global user.name "blabla"
git config --global user.email address@hidden

Or you can edit ~/.gitconfig directly and add

[user]
        name = blabla
        email = address@hidden

You can also configure per-repository usernames if you need different
names per project.  In that case, just omit --global or use --local.
Finally, you can do git commit --author = "blabla <address@hidden>"
if you want to commit using a particular name only once.

Please make a new commit using the correct author and send it, so that
we get the attribution right.

> (I actually checked this into git.  But in the origin/master branch -
> fully aware that this would not be the right thing to do if I was to
> push my changes.  However I expect myself at least to accidentally check
> things into the wrong branch and need to learn how to fix the mess.)

You can do two things: either make an ad-hoc branch and commit it to that,
then delete it.  Or you can simply commit to "master", use git format-patch
to create the patch, and then run "git reset --hard origin/master" to go
back to the original version you got from upstream (that's what I always do).

You should not commit to origin/master, I'm not even sure if git allows you
to do that (but, since it's git it probably allows you to shoot yourself in
the foot that way).  The origin/master branch is for keeping track of the
state of the "master" branch at the remote "origin" (which is what you
initially cloned it from).  This allows you to always go back to the state
we're on, like with the reset command I mentioned.  You can also use it
to rebase your own changes so that they are moved at the end of that branch.

Git is a stupidly retarded tool, and needlessly complicated.  All the
hipsters seem to enjoy showing off how they mastered its complexity, but
don't let that drag you down.  I found 
http://nfarina.com/post/9868516270/git-is-simpler
to be very helpful in making sense of the mess that is git.

Cheers,
Peter

Attachment: signature.asc
Description: Digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]