Firebird News

Wednesday, January 07, 2009

merging an fork with the main repository in git

I have fork-ed arora and i had added some very small changes
the problem is to update my repository and merge the changes already done on the main one

I go to my local cloned repository (the forked one is in my github account)
I use fetch to check what is changed vs my repository


$ git fetch git://github.com/Arora/arora.git master

watch the log
$ git log -p HEAD..FETCH_HEAD

or with gitk

$ gitk HEAD..FETCH_HEAD

I have added an remote repositry (so we have less typing)

$git remote add icefox git://github.com/Arora/arora.git
$ git fetch icefox
From git://github.com/Arora/arora
 * [new branch]      master     -> icefox/master
$git merge icefox/master

Removed src/locale/pt_BR.ts
Merge made by recursive.
arora.pro | 2 +-
autotests/autotests.pro | 1 +
manualtests/manualtests.pro | 4 ++--
src/locale/locale.pri | 5 +++--
src/locale/pt_BR.ts | Bin 43813 -> 0 bytes
src/locale/sk_SK.ts | Bin 0 -> 63590 bytes
src/locale/zh_CN.ts | Bin 0 -> 62833 bytes
src/utils/lineedit.cpp | 39 ++++++++++++++++++++++++---------------
src/utils/lineedit.h | 39 ++++++++++++++++++++++++---------------
src/utils/lineedit_p.h | 39 ++++++++++++++++++++++++---------------
src/utils/proxystyle.h | 2 +-
src/webview.cpp | 2 ++
tools/tools.pro | 7 ++++++-
13 files changed, 88 insertions(+), 52 deletions(-)
delete mode 100644 src/locale/pt_BR.ts
create mode 100644 src/locale/sk_SK.ts
create mode 100644 src/locale/zh_CN.ts

Then i tried to push the changes in my forked repository

git push origin master
To git@github.com:mariuz/arora.git
! [rejected] master -> master (non-fast forward)
error: failed to push some refs to 'git@github.com:mariuz/arora.git'

seems that i have made some changes in the repository at github that i didn't got them down

$ git pull
remote: Counting objects: 8, done.
remote: Compressing objects: 100% (6/6), done.
remote: Total 6 (delta 4), reused 0 (delta 0)
Unpacking objects: 100% (6/6), done.
From git@github.com:mariuz/arora
94cffc2..5c00b4c master -> origin/master
Merge made by recursive.
build_arora_qt_snapshot.sh | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)

$ git push origin master
Counting objects: 73, done.
Compressing objects: 100% (54/54), done.
Writing objects: 100% (54/54), 22.46 KiB, done.
Total 54 (delta 39), reused 0 (delta 0)
To git@github.com:mariuz/arora.git
5c00b4c..cdb7bb3 master -> master

So here it is the merge was done

http://github.com/mariuz/arora/commits/master

No comments: