[Phpmyadmin-devel] committing a patch to git
Dieter Adriaenssens
dieter.adriaenssens at gmail.com
Thu Mar 18 10:02:05 CET 2010
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi all,
Yesterday, I tried to commit a patch to the QA_3_3 branch and then
merge it with master.
Everything went well until I had to merge my changes in the QA_3_3
branch to master.
This is what I did :
git pull (to sync with current changes in git)
git checkout QA_3_3
(made changes to main.php and ChangeLog)
git commit -a -m "message"
so far no problems, but then
git checkout master
git merge QA_3_3
and then I got this :
$ git merge QA_3_3
Auto-merging ChangeLog
CONFLICT (content): Merge conflict in ChangeLog
Auto-merging Documentation.html
Auto-merging libraries/config.default.php
Auto-merging main.php
Auto-merging tbl_change.php
CONFLICT (content): Merge conflict in tbl_change.php
Automatic merge failed; fix conflicts and then commit the result.
I understand the automerge of Documentation.html and
libraries/config.default.php. They are probably different between
branches.
I understand why merging ChangeLog had difficulties, because I changed
something there.
I can imagine why main.php (the file I changed) merged without
problem, probably because that file was previously unchanged, so the
merge was no problem.
But what I don't understand is why the tbl_change.php caused problems.
I didn't touch that file, so as far as I'm concerned, that file should
have been correctly merged the previous time (commit before me).
After manualy changing the tbl_change.php and ChangeLog file, I did this :
git add ChangeLog
git add tbl_change.php
(because git status instructed me to)
and then
git commit
git push
This resulted in these two commits :
Changed link to git repository on main page
Merge branch 'QA_3_3'
It then turned out I forgot to solve two conflicts in tbl_change.php
(indicated by >>>>>> HEAD and <<<<<< QA_3_3). I changed this file and
commited again :
fix mistake in merge
Merge branch 'master' of ssh://phpmyadmin.git.sourcefor...
(the last commit happened automaticaly when I did a git pull, before
git push, because Marc had pushed a commit in the meanwhile)
So, I think everything in git is as it should be now. But I guess I
made some mistakes, or there must be a way to avoid these kind of
problems. (4 commits to change 2 lines of code seems a bit too much.
;) )
Everything went well until the merge part, so I wonder how you guys do it.
Is it possible to only merge the changes in the last commit, and
ignore all other files?
Thanks for the help.
Kind regards,
Dieter
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.12 (MingW32)
Comment: Use GnuPG with Firefox : http://getfiregpg.org (Version: 0.7.10)
iEYEARECAAYFAkuh7AwACgkQZGJbiPqZM6NKMgCeNbl8eMom81IBckdbnAKMXhI7
Gp0AmwdUVPcfZbgHz8hbBjIBvhszXnP1
=tzfb
-----END PGP SIGNATURE-----
More information about the Developers
mailing list