[Dctrl-tools-devel] development model

Antti-Juhani Kaijanaho antti-juhani at kaijanaho.fi
Thu Nov 8 17:30:20 UTC 2007


On Thu, Nov 08, 2007 at 11:52:07AM -0500, Jon Bernard wrote:
> Can you describe a typical checkout/modify/commit cycle with git
> commands for dctrl-tools? I believe I've got a pretty good understanding
> of git, but I may not know I've messed something up until it's too late.
> If you could paste a simple set of commands you use to make a change,
> that would be super helpful to me so I know I'm on the right track.

The following is off the top of my head. I've done everything here at
least once, but I can't swear there's no bugs in the instructions.

There are two cases:

a) When you are going to make a trivial fix that you plan to push
directly without posting to list:

# make sure that you have no uncommitted changes
git status     # (if you do, git stash would be a good idea)
# checkout master
git checkout master
# merge in remote changes
git pull origin master
# hack hack hack
# ...
# commit
git gui         # or you can use git commit :)
                # remember to sign-off the commit
		# BTW, just to be on the safe side,
		# please post to the list what you understand
		# signing-off to mean :)
# hack hack hack
# ...
# commit
git gui         # ... repeat as necessary
# review changes
gitk
# push
git push

b) When you are doing something nontrivial:

# first three as above:
git status      # git stash if necessary
git checkout master
git pull origin master
# make a topic branch
git checkout -b a-good-descriptive-name
# hack hack hack, commit - as above
# ...
# ...
# send patches to list
git format-patch master   # creates *.patch-files
# email the patches to the list
mutt                      # or whatever you use
                          # git send-email is a possibility
# hack hack hack (perhaps based on comments received by email)
# commit - as above
# ...
# if necessary, send new patch emails, as above
# ...
# if collab-maint's master gets new commits, rebase:
# a. first stash if necessary
# b. checkout master
git checkout master
# c. merge in remote changes
git pull origin master
# d. rebase your changes
git rebase master the-name-of-your-topic-branch
# hack hack hack, commit, send email - as above
# when it's all good:
# a. rebase, if needed - as above
# b. merge topic branch to master
git checkout master
git pull . the-name-of-your-topic-branch  # this SHOULD be a fast-forward!
# c. delete the branch
git branch -d the-name-of-your-topic-branch

-- 
Antti-Juhani Kaijanaho, Jyväskylä, Finland
http://antti-juhani.kaijanaho.fi/newblog/
http://www.flickr.com/photos/antti-juhani/



More information about the Dctrl-tools-devel mailing list