[Libreoffice] git howto question

2011-11-14 Thread Winfried Donkers
How do I update my local sources to the current (latest) master with git?
I am not familiar with git, have used 'git clone' and 'git diff', but I don't 
want to do 'git clone' again, of course.
Is 'git checkout' the proper way (run from the directory where .git is)?

I have some more german-english translations for sc/source/ui/view, but I want 
to make sure that I use the latest source files before I commit my lines.

Thanks a lot for your help.

Winfried

___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: [Libreoffice] git howto question

2011-11-14 Thread Chr. Rossmanith
You need to git pull -r but if you have your translations already done 
you need to commit them prior to pulling: git commit -m your commit 
message your modified file


Christina

Am 14.11.2011 11:54, schrieb Winfried Donkers:


How do I update my local sources to the current (latest) master with git?

I am not familiar with git, have used 'git clone' and 'git diff', but 
I don't want to do 'git clone' again, of course.


Is 'git checkout' the proper way (run from the directory where .git is)?

I have some more german-english translations for sc/source/ui/view, 
but I want to make sure that I use the latest source files before I 
commit my lines.


Thanks a lot for your help.

Winfried


___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: [Libreoffice] git howto question

2011-11-14 Thread Michael Meeks
Hi Winfried,

On Mon, 2011-11-14 at 11:54 +0100, Winfried Donkers wrote:
 How do I update my local sources to the current (latest) master with
 git?

Ah - it is a trick indeed :-) As Christina says - if you have commited
you can 'git pull -r' which will re-base your commit on top of the
latest code it fetches.

Unfortunately, if someone tweaked your commit as they pushed it - that
is a tad problematic since you may get conflicts that are hard to
resolve.

I'd personally recommend:

git stash
git pull -r
git stash pop

Then any conflicts you'll end up with (hopefully) are minimal, can be
easliy seen with 'git diff' and will not require much further
intervention ;-)

 Is 'git checkout' the proper way (run from the directory where .git
 is)?

So - checkout is fine; but if you are sure you have your changes safely
stored as a diff somewhere - then what you can do is to re-wind your
checkout (HEAD) back, and then re-base that; so ...

git tag -f here # just in case - so you can get back
git stash # in case of any un-committed local changes
git reset --hard HEAD~100 # move 100 commits back in time
git pull -r # pull  re-base master from this point

the last command will re-insert any of those 100 commits that were not
your local edited copies, and of course all the latest changes it has
pulled from master too.

 I have some more german-english translations for sc/source/ui/view,
 but I want to make sure that I use the latest source files before I
 commit my lines.

Great :-) so - it seems unlikely that the code there will have changed
that much, but it's always good to check.

Don't worry: git has a steep learning curve - steep enough that I still
have a vivid memory of climbing it ;-) when you get to the top you'll
think[1] it was worth it though. Looking forward to your patch  thanks
for helping out with the comment translation, 

Much appreciated,

Michael.

[1] - hard to tell if it really was of course, but you think so ;-)
-- 
michael.me...@suse.com  , Pseudo Engineer, itinerant idiot

___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: [Libreoffice] git howto question

2011-11-14 Thread Simos Xenitellis
Sometimes people forget the '-r' parameter in 'git pull -r' so it is
suggested to create an alias,

git config --global alias.up pull --rebase


(you run this command and the alias is added to your ~/.gitconfig
configuration file).
Then, you run

git up

whenever you want to updated your local repository with changes from the
main LibreOffice Git repository.

Without the '-r' or '--rebase' you may get into a situation when you create
a branch at the main LibreOffice Git repository, which in most cases is not
what you want. Hence, the '--rebase' parameter.

Is there a Wiki page somewhere at
http://wiki.documentfoundation.org/Development that would be recommended to
add in some basic Git commands? Point to an existing page or recommend a
URL to add new content inside.

Simos

On Mon, Nov 14, 2011 at 1:05 PM, Chr. Rossmanith chrrossman...@gmx.dewrote:

 **
 You need to git pull -r but if you have your translations already done
 you need to commit them prior to pulling: git commit -m your commit
 message your modified file

 Christina

 Am 14.11.2011 11:54, schrieb Winfried Donkers:

  How do I update my local sources to the current (latest) master with git?
 

 I am not familiar with git, have used 'git clone' and 'git diff', but I
 don't want to do 'git clone' again, of course.

 Is 'git checkout' the proper way (run from the directory where .git is)?**
 **

 ** **

 I have some more german-english translations for sc/source/ui/view, but I
 want to make sure that I use the latest source files before I commit my
 lines.

 ** **

 Thanks a lot for your help.

 ** **

 Winfried





___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: [Libreoffice] git howto question

2011-11-14 Thread Winfried Donkers
Thank you for your advice, it is a steep curve indeed (git, make, finding your 
way in the code).
I'm now testing whether my translations haven't done any harm te the code 
itself by making the lot and I hope to commit some more translations sometime 
tommorrow. I intend to finish the one dirctory (sc/source/ui/view) and then I 
hope to find an easy hack in C++ (but all at a leisurely pace...).

Winfried


-Original Message-
From: Michael Meeks [mailto:michael.me...@suse.com] 
Sent: maandag 14 november 2011 13:24
To: Winfried Donkers
Cc: libreoffice@lists.freedesktop.org
Subject: Re: [Libreoffice] git howto question

Hi Winfried,

On Mon, 2011-11-14 at 11:54 +0100, Winfried Donkers wrote:
 How do I update my local sources to the current (latest) master with
 git?

Ah - it is a trick indeed :-) As Christina says - if you have commited
you can 'git pull -r' which will re-base your commit on top of the
latest code it fetches.

Unfortunately, if someone tweaked your commit as they pushed it - that
is a tad problematic since you may get conflicts that are hard to
resolve.

I'd personally recommend:

git stash
git pull -r
git stash pop

Then any conflicts you'll end up with (hopefully) are minimal, can be
easliy seen with 'git diff' and will not require much further
intervention ;-)

 Is 'git checkout' the proper way (run from the directory where .git
 is)?

So - checkout is fine; but if you are sure you have your changes safely
stored as a diff somewhere - then what you can do is to re-wind your
checkout (HEAD) back, and then re-base that; so ...

git tag -f here # just in case - so you can get back
git stash # in case of any un-committed local changes
git reset --hard HEAD~100 # move 100 commits back in time
git pull -r # pull  re-base master from this point

the last command will re-insert any of those 100 commits that were not
your local edited copies, and of course all the latest changes it has
pulled from master too.

 I have some more german-english translations for sc/source/ui/view,
 but I want to make sure that I use the latest source files before I
 commit my lines.

Great :-) so - it seems unlikely that the code there will have changed
that much, but it's always good to check.

Don't worry: git has a steep learning curve - steep enough that I still
have a vivid memory of climbing it ;-) when you get to the top you'll
think[1] it was worth it though. Looking forward to your patch  thanks
for helping out with the comment translation, 

Much appreciated,

Michael.

[1] - hard to tell if it really was of course, but you think so ;-)
-- 
michael.me...@suse.com  , Pseudo Engineer, itinerant idiot

___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice