[TYPO3-core] [GIT] Best practice with daily tasks

Stefano Kowalke blueduck at gmx.net
Tue Mar 1 19:21:57 CET 2011

> Now Peter told me that it's possible to work on master, and then commit
> direct into a new branch. How to do this?

The long command is:
git push ssh://<username>@review.typo3.org/<projectname>

If you add the host in your ssh config file (~/.ssh/config) like this:
Host review.typo3.org
User <username>
Hostname review.typo3.org
IdentityFile ~/.ssh/id_dsa
Port 29418

you can leave out the <username> part in the command:

git push review.typo3.org:<projectname> HEAD:refs/for/<branch>

The Host in the ssh config is variable. You name it. Its possible to
have this in ~/.ssh/config:
Host t3gerrit
User <username>
Hostname review.typo3.org
IdentityFile ~/.ssh/id_dsa
Port 29418

and push it like this: git push t3gerrit:<projectname>

Next step is to define a remote in you local .git/config file of the
TYPO3v4Core repository. Assume your a working on a new feature called
"feature_1234" and you want push this through gerrit into remote branch
"feature_1234" you could write this in the .git/config:

[remote "for-feature_1234"]
	url = t3gerrit:<projectname>
	push = HEAD:refs/for/feature_1234

Then you can push this with this short command:
git push for-feature_1234


More information about the TYPO3-team-core mailing list