vcs:gitfaq

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

vcs:gitfaq [2013/01/30 16:47]
tyrael mention 5.5 where appropriate
vcs:gitfaq [2014/03/18 08:35] (current)
shm fixed typo in checkout PHP-5.3 branch
Line 76: Line 76:
 Allow you to omit the "​--no-ff"​ switch in merge. ​ Requires Git 1.7.6 or later. Allow you to omit the "​--no-ff"​ switch in merge. ​ Requires Git 1.7.6 or later.
   $ git config --add merge.ff false   $ 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 "​Multiple working copies workflow"​ steps (shown below) from working:
 +  $ git config --global push.default current ​
  
 Consider setting up sensible .gitignore settings (see also http://​help.github.com/​ignore-files/​) Consider setting up sensible .gitignore settings (see also http://​help.github.com/​ignore-files/​)
Line 114: Line 117:
   $ git clone http://​git.php.net/​repository/​php-src.git   $ git clone http://​git.php.net/​repository/​php-src.git
   ....   ....
-  $ git branch --track 5.3 origin/​PHP-5.3 +  $ git branch --track ​PHP-5.3 origin/​PHP-5.3 
-  $ git branch --track 5.4 origin/​PHP-5.4 +  $ git branch --track ​PHP-5.4 origin/​PHP-5.4 
-  $ git branch --track 5.5 origin/​PHP-5.5+  $ git branch --track ​PHP-5.5 origin/​PHP-5.5 
 +  $ git branch --track PHP-5.6 origin/​PHP-5.6
   $ git branch --track master origin/​master   $ git branch --track master origin/​master
-  $ git checkout 5.3+  $ git checkout ​PHP-5.3
   ... edit Zend/zend.c ...   ... edit Zend/zend.c ...
   $ git commit Zend/zend.c   $ git commit Zend/zend.c
-  $ git checkout 5.4 +  $ git checkout ​PHP-5.4 
-  $ git merge --log 5.3 +  $ git merge --log PHP-5.3 
-  $ git checkout 5.5 +  $ git checkout ​PHP-5.5 
-  $ git merge --log 5.4+  $ git merge --log PHP-5.4 
 +  $ git checkout PHP-5.6 
 +  $ git merge --log PHP-5.5
   $ git checkout master   $ git checkout master
-  $ git merge --log 5.5+  $ git merge --log PHP-5.6
   $ git push   $ git push
  
Line 166: Line 172:
   conf@laptop ~ $ bash /​usr/​share/​doc/​git/​contrib/​workdir/​git-new-workdir ./php-src ./php-5.5 PHP-5.5   conf@laptop ~ $ bash /​usr/​share/​doc/​git/​contrib/​workdir/​git-new-workdir ./php-src ./php-5.5 PHP-5.5
   Switched to branch '​PHP-5.5'​   Switched to branch '​PHP-5.5'​
 +  conf@laptop ~ $ bash /​usr/​share/​doc/​git/​contrib/​workdir/​git-new-workdir ./php-src ./php-5.6 PHP-5.6
 +  Switched to branch '​PHP-5.6'​
  
-Now you have your PHP5.3 branch checked out in ~/php5.3, PHP5.4 in ~/php5.4 and master in ~/php-src.+Now you have your PHP-5.3 branch checked out in ~/php-5.3, PHP-5.4 in ~/php-5.4, PHP-5.5 in ~/php-5.5, PHP-5.6 in ~/​php-5.6 ​and master in ~/php-src.
  
 ** Make initial fix in 5.3 (better in a separate branch): ** ** Make initial fix in 5.3 (better in a separate branch): **
Line 193: Line 201:
   cd ~/php-5.5   cd ~/php-5.5
   git checkout PHP-5.5   git checkout PHP-5.5
 +  git pull
 +
 +  cd ~/php-5.6
 +  git checkout PHP-5.6
   git pull   git pull
  
Line 212: Line 224:
   git diff origin/​PHP-5.3 # review changes   git diff origin/​PHP-5.3 # review changes
  
-** Merge upwards to 5.4 and 5.5: **+** Merge upwards to 5.45.5, 5.6 and master: **
  
   cd ~/php-5.4   cd ~/php-5.4
Line 223: Line 235:
   git merge --no-ff PHP-5.4   git merge --no-ff PHP-5.4
   git diff origin/​PHP-5.5   git diff origin/​PHP-5.5
 +
 +  cd ~/php-5.6
 +  git checkout PHP-5.6
 +  git merge --no-ff PHP-5.5
 +  git diff origin/​PHP-5.6
  
   cd ~/php-src   cd ~/php-src
   git checkout master   git checkout master
-  git merge --no-ff PHP-5.5+  git merge --no-ff PHP-5.6
   git diff origin/​master   git diff origin/​master
 +  ​
 +** Test push **
 +
 +  git push --dry-run origin
  
 ** Push the changes ** ** Push the changes **
vcs/gitfaq.1359560839.txt.gz · Last modified: 2013/01/30 16:47 by tyrael