Back to LanguageTool Homepage - Privacy - Imprint

GIT commit issues - help needed to revert

I made a few momments ago a commit of changes in two files from the portuguese branch.
resources/pt/added.txt and resources/pt/removed.txt

While trying to push it told me that there was a merge conflict so I had to pull from HEAD. I pulled but it asked to MERGE_HEAD. Since there were a lot of files touched, I canceled and looked for information.


I made:
git reset --hard HEAD
git pull

Git Cola was showing the files again so I made the local commit there.

again search the net and found this:

the diff was this:

`diff --git a/languagetool-language-modules/pt/src/main/resources/org/languagetool/resource/pt/removed.txt b/languagetool-language-modules/pt/src/main/resources/org/languagetool/resource/pt/removed.txt
index 8919bbd…462b7ed 100644
— a/languagetool-language-modules/pt/src/main/resources/org/languagetool/resource/pt/removed.txt
+++ b/languagetool-language-modules/pt/src/main/resources/org/languagetool/resource/pt/removed.txt
@@ -2,19 +2,25 @@

Useful to remove incorrect readings from the binary dictionary without rebuilding it.

File Encoding: UTF-8

Format: fullform baseform postags (tab separated)

-oo o NCMP000
-cãos cão NCMP000
+a a NCMS000
cãos cão AQ0MP0
-umas umar VMIP2S0
-uma umar VMIP3S0
-uma umar VMM02S0
-o o NCMS000
-há há NCMS000
+cãos cão NCMP000
+eu eu NCMS000
fez fez NCMS000
-# nós - singular de fezes raramente usado em comparação com a forma verbal
-imperador imperador NCMS000
+# fez - singular de fezes raramente usado em comparação com a forma verbal
+finança finança NCMS000
+finanças finanças NCMP000
+há há NCMS000
imperador imperador AQ0MP0
-eu eu NCMS000
+imperador imperador NCMP000
nós nós NCMP000

nós - singular de nozes raramente usado em comparação com o pronome pessoal

+o o NCMS000
+oo o NCMP000
+quentes quentar VMM02S0
+quentes quentar VMSP2S0
+uma umar VMIP3S0
+uma umar VMM02S0
+umas umar VMIP2S0


All good.

git push

I go to github to confirm all the files changed appear on the commit. See:

Please, how can I revert that ASAP.

There’s (probably) no need to revert anything, What you see is just a merge commit, i.e. there are other people’s changes, but that’s okay. You can avoid this by always updating with -r (rebase) in the future. This will avoid these merge commits and instead cleanly separate your changes from other people’s changes in the history.

BTW, when you have git installed you probably also have gitk installed. It’s a simple GUI, I use it before I push changes. It shows what changes I have done that are not yet pushed.

Hi Daniel,

I was replying also via e-mail when I saw this.

Sorry for the e-mail from the wrong e-mail account. That is Thunderbird standard account but I missed changing it while I was rushing to warn you.

I am using ‘git cola’ to see and understand the process and the command line to push changes or follow guidelines.
I tryed gitk is not working on my install. Not sure why.

I do not wish to complicate the project, but since I am a rookie I would prefer to have all my contribution well identified. So I would prefer to revert all of it?

The last commit before mine was yours according to:

Reading through:

I found this comand (adapted to your commit):
git revert d5662eb

but consider there is another option explained that may also apply and that is confusing me:

Reverting a merge commit
git revert -m 1 <merge_commit_sha>

Sorry again for causing stress and thank you again for all the help.

No, there’s nothing to revert, really. Everything is fine. Just for the future, make sure when you get other people’s updates, use git pull -r instead of just git pull (or whatever setting your client needs to make a pull with rebase).

I was interpreting the git reverse as ‘revert to’.
Reading better the about ‘git reverse’ maybe 'git revert d31f64c' makes more sense.
There is already another commit on top. Can somebody confirm an appropriate option to undo/revert my commit on the repo?

Had not seen this reply. Thank you. I will be mindfull of always using the git pull -r. And to confirm all doubts before making the push command.