[TYPO3-mvc] FYI: GitHelper

Bastian Waidelich bastian at typo3.org
Mon Jan 31 21:58:28 CET 2011


Franz Koch wrote:

Hi Franz,

> thanks for your helper and for pointing to the wiki pages. After reading
> those and having configured everything I've got a short question about
> how one should work with his local repo, having in mind that each local
> commit (even in a branch) would also become a changeset in the upstream
> codebase [...]

Ok, that is my current workflow:

The first thing I had to get used to was to always create a local branch 
for every new feature/fix/change I start to work on.
Those local branches are really "cheap" in git and you can delete them 
anytime without flooding the log.

Secondly I try to commit often - at least once before closing time.
Mostly commits in one dev branch belong to one issue so they should end 
up in one changeset. To achieve that, you want to use "git commit 
--amend" which allows you to "change history" ;)

Personally I only use stashing if I forgot to create a local branch.

To test a pending changeset, I do the following:
1. update master ("git checkout master", "git pull")
2. create local branch from master ("git branch dev", "git checkout dev")
3. copy & paste the "cherry-pick" command from the changeset @ 
review.typo3.org (e.g. "git fetch 
git://git.typo3.org/TYPO3v4/Extensions/extbase_kickstarter 
refs/changes/05/705/1 && git cherry-pick FETCH_HEAD")
4. test, post review and/or commit & push changes to create a new 
changeset (you'll have to use the --amend option in order to keep the 
previous commit message & the Change-Id so gerrit can detect the commit).

HTH,
Bastian


More information about the TYPO3-project-typo3v4mvc mailing list