Re: more questions about git



On Sun, May 24, 2009 at 5:10 PM, Tirumurti Vasudevan <agnihot3 gmail com> wrote:
> worked on evince and wanted to update.
> here goes...
>
> drtv narayana:~/git/evince/po$ git status
> # On branch master
> # Changed but not updated:
> #   (use "git add <file>..." to update what will be committed)
> #
> #       modified:   ta.po
> #
> # Untracked files:
> #   (use "git add <file>..." to include in what will be committed)
> #
> #       evince.pot
> no changes added to commit (use "git add" and/or "git commit -a")
>
> i know i have modified it and so commiting....
>
> drtv narayana:~/git/evince/po$ git commit ta.po -m "Updated Tamil translation"
> Created commit 32e9602: Updated Tamil translation
>  1 files changed, 402 insertions(+), 335 deletions(-)

Ok, you committed the change.

> drtv narayana:~/git/evince/po$ git pull --rebase

When you run 'git pull --rebase' after the commit, git has to figure
out how to pull from the repository and at the same time adjust your
commit so that it is still valid.

Normally it is suggested (maybe recommended, not sure yet what to put)
to 'git up' first and then make a commit.
It actually makes sense to 'git up' first, because you want 'intltool-update ta'
to get the latest messages from the source code.

> remote: Counting objects: 139, done.
> remote: Compressing objects: 100% (88/88), done.
> remote: Total 88 (delta 73), reused 0 (delta 0)
> Unpacking objects: 100% (88/88), done.
> From ssh://vasudeven git gnome org/git/evince
>   556ba37..8259235  gnome-2-26 -> origin/gnome-2-26
>   e9d4aef..8dce1eb  master     -> origin/master
> First, rewinding head to replay your work on top of it...
> Applying Updated Tamil translation
> error: patch failed: po/ta.po:8
> error: po/ta.po: patch does not apply
> Using index info to reconstruct a base tree...
> Falling back to patching base and 3-way merge...
> Auto-merged po/ta.po
> CONFLICT (content): Merge conflict in po/ta.po
> Failed to merge in the changes.
> Patch failed at 0001.
>
> When you have resolved this problem run "git rebase --continue".
> If you would prefer to skip this patch, instead run "git rebase --skip".
> To restore the original branch and stop rebasing run "git rebase --abort".
>
> drtv narayana:~/git/evince/po$ git rebase --abort

Git recommends to try some commands. I have not tried these and am not
sure what state they get your local clone in. My preference is to try
at this stage the 'I messed up; Now?' section.

> HEAD is now at 32e9602 Updated Tamil translation
>
>
> ok, so the file reverted to the untranslated version, which i verified
> seeing the lines in the files.
> i had worked on it in another partition and so i open that files and
> copy paste the entire text.
>
> drtv narayana:~/git/evince/po$ git commit ta.po -m "Updated Tamil translation"
> Created commit 22d0c47: Updated Tamil translation
>  1 files changed, 179 insertions(+), 235 deletions(-)
> drtv narayana:~/git/evince/po$ git rebase --abort
> No rebase in progress?
> drtv narayana:~/git/evince/po$ git pull --rebase
> First, rewinding head to replay your work on top of it...
> Applying Updated Tamil translation
> error: patch failed: po/ta.po:8
> error: po/ta.po: patch does not apply
> Using index info to reconstruct a base tree...
> Falling back to patching base and 3-way merge...
> Auto-merged po/ta.po
> CONFLICT (content): Merge conflict in po/ta.po
> Failed to merge in the changes.
> Patch failed at 0001.
>
> When you have resolved this problem run "git rebase --continue".
> If you would prefer to skip this patch, instead run "git rebase --skip".
> To restore the original branch and stop rebasing run "git rebase --abort".
>
> drtv narayana:~/git/evince/po$ git rebase --abort
> HEAD is now at 22d0c47 Updated Tamil translation
>
>
> so i guess this belongs to "i have messed up"and so....
>
> drtv narayana:~/git/evince/po$ git reset --hard
> HEAD is now at 22d0c47 Updated Tamil translation
> drtv narayana:~/git/evince/po$ git reset --hard HEAD^

This command is not in the 'messed up' section. However, it is required in your
case because I see you committed some changes.
Did you commit once or more times?
You can try 'git log origin..master' to see what commits you performed
that did not get pushed to git.gnome.org.
The list needs to be empty in order to 'git up', so that you do not have
local commits pending.

Simos

> HEAD is now at 32e9602 Updated Tamil translation
> drtv narayana:~/git/evince/po$ git pull --rebase
> First, rewinding head to replay your work on top of it...
> Applying Updated Tamil translation
> error: patch failed: po/ta.po:8
> error: po/ta.po: patch does not apply
> Using index info to reconstruct a base tree...
> Falling back to patching base and 3-way merge...
> Auto-merged po/ta.po
> CONFLICT (content): Merge conflict in po/ta.po
> Failed to merge in the changes.
> Patch failed at 0001.
>
> When you have resolved this problem run "git rebase --continue".
> If you would prefer to skip this patch, instead run "git rebase --skip".
> To restore the original branch and stop rebasing run "git rebase --abort".
>
>
>
> back to square one.
> so i want tp remove the last commit. reading the help pages i need to
> see the log.
>
>
> drtv narayana:~/git/evince/po$ git log
> commit 8dce1eb587532e5a0cad308be171df432c1e14d5
> Author: Ivar Smolin <okul linux ee>
> Date:   Sun May 24 17:25:44 2009 +0300
>
>    Updating Estonian translation
>
> commit c05ac2f90eae9f4a56c27a136b60fbe20f202dfe
> Author: Carlos Garcia Campos <carlosgc gnome org>
> Date:   Sat May 23 19:55:46 2009 +0200
>
>    [libview] Add ev_view_get_area_from_mapping() to remove duplicated code
>
> commit 25e463986a2f9b45c2218fe8d9627c43eb02afbe
> Author: Carlos Garcia Campos <carlosgc gnome org>
> Date:   Sat May 23 19:42:03 2009 +0200
>
>    [libview] Add get_doc_point_from_location() to remove duplicated code
>
> commit 44205a9ede6bde99d7594a9c531521540acc7e81
> Author: Carlos Garcia Campos <carlosgc gnome org>
> Date:   Sat May 23 19:13:54 2009 +0200
>
>
>
> alas some other translations have been there.
> now i should go and see it on the git repo to see what to remove?
>
> tv
>    [libdcoument] Remove all Ev*Mapping types
> :
>


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]