* git workflow for casual developers
@ 2008-06-05 4:57 Eliot Blennerhassett
2008-06-06 10:51 ` Takashi Iwai
0 siblings, 1 reply; 3+ messages in thread
From: Eliot Blennerhassett @ 2008-06-05 4:57 UTC (permalink / raw)
To: alsa-devel
Hi all,
So. we are now using git repositories. I'd better find out how to use git...
I plan to turn responses to this into a howto here
http://alsa-project.org/main/index.php/GIT_Server
I.e. what should someone do who is going to clone the repo, make a few
changes, then email patches to a maintainer + alsa-devel?
0) clone the repository
git clone git://git.alsa-project.org/alsa-driver.git alsa-driver
git clone git://git.alsa-project.org/alsa-kmirror.git alsa-kmirror
What should I do next if I want to make some changes?
Here's what I did, or discovered I should have done :(
1) git-config --add user.email me@domain.com
Otherwise commits get spurious email address for Author and Commiter (is there
any way to fix this after the fact?)
2) should I create a branch in my cloned repo for my changes, or just go ahead
and commit?
(I didn't create a branch)
3) How do I generate patches for my changes to the repo?
Luckily for me there was a tag that was close enough so I could
git-diff v1.0.17rc1
Should I really have used this as the "revision"?
git-diff remotes/origin/master
Then do this to generate the patchset
git-format-patch -s -n -p --subject-prefix="PATCH - my module" v1.0.17rc1
4) Check the patches
/lib/modules/2.6.24-17-generic/build/scripts/checkpatch.pl --no-tree *.patch
5) Sending the patches
Make sure it knows how to send
git-config --add sendemail.smtpserver smtp.domain.com
git-send-email --from=me --to=tiwai@suse.de --cc=alsa-devel@alsa-project.org
000*.patch
6) OK, what have I missed?
regards
--
--
Eliot Blennerhassett
www.audioscience.com
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: git workflow for casual developers
2008-06-05 4:57 git workflow for casual developers Eliot Blennerhassett
@ 2008-06-06 10:51 ` Takashi Iwai
2008-06-06 12:26 ` Mark Brown
0 siblings, 1 reply; 3+ messages in thread
From: Takashi Iwai @ 2008-06-06 10:51 UTC (permalink / raw)
To: Eliot Blennerhassett; +Cc: alsa-devel
At Thu, 05 Jun 2008 16:57:22 +1200,
Eliot Blennerhassett wrote:
>
> 1) git-config --add user.email me@domain.com
> Otherwise commits get spurious email address for Author and Commiter (is there
> any way to fix this after the fact?)
You need to re-commit the patch. For editing the tip commit log, you
can use "git-commit --amend".
> 2) should I create a branch in my cloned repo for my changes, or just go ahead
> and commit?
> (I didn't create a branch)
It's totally up to you. I prefer creating a patch or work on another
tree to avoid unnecessary breakage via git-pull, though.
> 3) How do I generate patches for my changes to the repo?
> Luckily for me there was a tag that was close enough so I could
> git-diff v1.0.17rc1
>
> Should I really have used this as the "revision"?
> git-diff remotes/origin/master
Before submitting to the upstream, try to rebase to the latest
upstream version. In my case, a typical workflow is like below:
# suppose that we are working on master branch
# fetch from the upstream
% git-fetch origin
# save the current branch
% git-branch save
# rebase to the latest upstream
% git-rebase origin/master
# if you got an error and want to rollback to the old tree...
% git-reset --hard save
# if no error and it's fine, remove the saved branch
% git-branch -D save
Takashi
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: git workflow for casual developers
2008-06-06 10:51 ` Takashi Iwai
@ 2008-06-06 12:26 ` Mark Brown
0 siblings, 0 replies; 3+ messages in thread
From: Mark Brown @ 2008-06-06 12:26 UTC (permalink / raw)
To: Takashi Iwai; +Cc: alsa-devel
On Fri, Jun 06, 2008 at 12:51:08PM +0200, Takashi Iwai wrote:
> Eliot Blennerhassett wrote:
> > 1) git-config --add user.email me@domain.com
> > Otherwise commits get spurious email address for Author and Commiter (is there
> > any way to fix this after the fact?)
> You need to re-commit the patch. For editing the tip commit log, you
> can use "git-commit --amend".
For non-tip commits the interactive mode of git rebase can be used to do
this - select 'edit' for the commits you want to change.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2008-06-06 12:26 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-06-05 4:57 git workflow for casual developers Eliot Blennerhassett
2008-06-06 10:51 ` Takashi Iwai
2008-06-06 12:26 ` Mark Brown
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.