vcs:gitfaq
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
vcs:gitfaq [2018/08/07 01:39] – Minor typos carusogabriel | vcs:gitfaq [2021/04/06 08:00] (current) – rename master to main sergey | ||
---|---|---|---|
Line 5: | Line 5: | ||
===== Introduction ===== | ===== Introduction ===== | ||
- | The PHP git repositories are at http:// | + | The PHP git repositories are at https:// |
PEAR repositories are in https:// | PEAR repositories are in https:// | ||
Line 33: | Line 33: | ||
===== Clone URL and Push URL ==== | ===== Clone URL and Push URL ==== | ||
- | Read only urls are | + | Clone/Push URL |
- | + | ||
- | http:// | + | |
- | git:// | + | |
- | + | ||
- | Clone/Push URL (always requires password) | + | |
- | https://git.php.net/push/ | + | https://github.com/php/ |
SSH URL | SSH URL | ||
| | ||
- | git@git.php.net:php-src.git | + | git@github.com:php/php-src.git |
Hint: set the push URL (https or git@) with (see also, Quickstart below) | Hint: set the push URL (https or git@) with (see also, Quickstart below) | ||
Line 67: | Line 62: | ||
Add a list of merged commits to the autogenerated commit message | Add a list of merged commits to the autogenerated commit message | ||
$ git config merge.log true | $ git config merge.log true | ||
- | |||
- | Add an alias for checkout. you can now use git co to checkout a branch | ||
- | $ git config alias.co checkout | ||
Enable colored output for git commands | Enable colored output for git commands | ||
$ git config color.ui true | $ git config color.ui true | ||
- | |||
- | Allow you to omit the " | ||
- | $ git config --add merge.ff false | ||
Avoids pushing other branches by accident when using a plain "git push". Git will only push the branch you are on by default. Note this will prevent the " | Avoids pushing other branches by accident when using a plain "git push". Git will only push the branch you are on by default. Note this will prevent the " | ||
Line 101: | Line 90: | ||
===== Quickstart ===== | ===== Quickstart ===== | ||
- | $ git clone http://git.php.net/ | + | $ git clone https://github.com/php/ |
$ cd php-src | $ cd php-src | ||
- | // if you want to push throuh https | ||
- | $ git config remote.origin.pushurl https:// | ||
// update repository | // update repository | ||
$ git pull --rebase | $ git pull --rebase | ||
Line 115: | Line 102: | ||
Always commit to the oldest branch. If your commit is good for PHP 5.6 and PHP 7.0, commit to PHP 5.6. Then merge your commit. | Always commit to the oldest branch. If your commit is good for PHP 5.6 and PHP 7.0, commit to PHP 5.6. Then merge your commit. | ||
- | $ git clone http://git.php.net/ | + | $ git clone https://github.com/php/ |
.... | .... | ||
$ git branch --track PHP-5.6 origin/ | $ git branch --track PHP-5.6 origin/ | ||
Line 124: | Line 111: | ||
$ git commit Zend/zend.c | $ git commit Zend/zend.c | ||
$ git checkout PHP-7.0 | $ git checkout PHP-7.0 | ||
- | $ git merge --log PHP-5.6 | + | $ git merge PHP-5.6 |
$ git checkout master | $ git checkout master | ||
- | $ git merge --log PHP-7.0 | + | $ git merge PHP-7.0 |
$ git push | $ git push | ||
Line 138: | Line 125: | ||
cd | cd | ||
- | git clone git@git.php.net:php-src.git | + | git clone git@github.com:php/php-src.git |
or if you're behind a firewall: | or if you're behind a firewall: | ||
cd | cd | ||
- | git clone https://git.php.net/ | + | git clone https://github.com/php/ |
cd ~/php-src | cd ~/php-src | ||
- | git config remote.origin.pushurl https:// | ||
==== Recommended: | ==== Recommended: | ||
Line 244: | Line 230: | ||
cd ~/ | cd ~/ | ||
git checkout PHP-5.6 | git checkout PHP-5.6 | ||
- | git merge --no-ff | + | git merge < |
git diff origin/ | git diff origin/ | ||
Line 251: | Line 237: | ||
cd ~/php-7.0 | cd ~/php-7.0 | ||
git checkout PHP-7.0 | git checkout PHP-7.0 | ||
- | git merge --no-ff | + | git merge PHP-5.6 |
git diff origin/ | git diff origin/ | ||
cd ~/php-src | cd ~/php-src | ||
git checkout master | git checkout master | ||
- | git merge --no-ff | + | git merge PHP-7.0 |
git diff origin/ | git diff origin/ | ||
| | ||
Line 280: | Line 266: | ||
===== Using SSH ==== | ===== Using SSH ==== | ||
- | * Add your SSH key to your profile on http://master.php.net/ | + | * Add your SSH key to your profile on https://main.php.net/ |
* you can set multiple keys in separate lines | * you can set multiple keys in separate lines | ||
* if you get the "the ssh key doesn' | * if you get the "the ssh key doesn' | ||
* Wait 10 minutes | * Wait 10 minutes | ||
- | * Clone from or set new repository to git@git.php.net:php-src.git | + | * Clone from or set new repository to git@github.com:php/php-src.git |
For web git repositories, | For web git repositories, | ||
- | git config remote.origin.pushurl git@git.php.net:/web/qa.git | + | git config remote.origin.pushurl git@github.com:php/php-src.git |
Line 305: | Line 291: | ||
===== Commit Mails ===== | ===== Commit Mails ===== | ||
- | Commit mails are send to the appropriate | + | Commit mails are send to the appropriate |
For every push a mail with an overview about the pushed changes will be mailed. Follow up mails for every commit will be sent. They will include the | For every push a mail with an overview about the pushed changes will be mailed. Follow up mails for every commit will be sent. They will include the | ||
patch, a list of changed paths and the commit message. The list of changed paths will also be the subject. | patch, a list of changed paths and the commit message. The list of changed paths will also be the subject. | ||
Line 311: | Line 297: | ||
====== FAQ ====== | ====== FAQ ====== | ||
- **Can I checkout a subdirectory only?** Yes, but it's a rather new and experimental feature. See [[http:// | - **Can I checkout a subdirectory only?** Yes, but it's a rather new and experimental feature. See [[http:// | ||
- | - **Rebase What?** Read [[http://blog.experimentalworks.net/2009/03/merge-vs-rebase-a-deep-dive-into-the-mysteries-of-revision-control/ | + | - **Rebase |
- | - More questions? Just add them, I will try to answer | + | - (Awaiting |
- | - What about commits that should not be merged upwards (say, only for 5.3)? Should you still merge them but make it so no changes actually take place? Otherwise, it will the next person merging that will have to deal with the conflict (or worse, the changes will be merged when they shouldn' | + | |
+ | If you have questions, please send them to internals@lists.php.net. |
vcs/gitfaq.1533605955.txt.gz · Last modified: 2018/08/07 01:39 by carusogabriel