Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Regarding unable to commit the changes in local repository.
Forum Updated to NodeBB v4.3 + New Features

Regarding unable to commit the changes in local repository.

Scheduled Pinned Locked Moved Unsolved General and Desktop
67 Posts 6 Posters 32.2k Views 4 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • Pradeep KumarP Offline
    Pradeep KumarP Offline
    Pradeep Kumar
    wrote on last edited by
    #47
    This post is deleted!
    1 Reply Last reply
    0
    • jsulmJ jsulm

      @Pradeep-Kumar said in Regarding unable to commit the changes in local repository.:

      git config --list

      OK, I don't think there is a duplicate. You just have username/email in your global config (~/.gitconfig) and in your project (.git/config). In your project the local username/email are used.

      JKSHJ Offline
      JKSHJ Offline
      JKSH
      Moderators
      wrote on last edited by
      #48

      @jsulm said in Regarding unable to commit the changes in local repository.:

      OK, I don't think there is a duplicate. You just have username/email in your global config (~/.gitconfig) and in your project (.git/config). In your project the local username/email are used.

      @jsulm is right.

      Run these commands separately:

      git config --global --list
      git config --local --list

      Which username/email do you want to use?

      @Pradeep-Kumar said in Regarding unable to commit the changes in local repository.:

      [user]
      name = Pradeep Kumar.M
      email = pradeepkm186@gmail.com

      If you don't want your local name/email, delete these 3 lines and save.

      But still how to make Qt creator understand, the user.name and user.email to take it repectively, after when i press commit.

      First of all, make sure you can use git outside of Qt Creator.

      1. Can you commit from the command line? (Command is git commit)
      2. Do you have a git GUI?

      Qt Doc Search for browsers: forum.qt.io/topic/35616/web-browser-extension-for-improved-doc-searches

      1 Reply Last reply
      1
      • Pradeep KumarP Offline
        Pradeep KumarP Offline
        Pradeep Kumar
        wrote on last edited by
        #49

        I ran two commands separately
        Both gave me the user.email different.
        i have deleted locally and retained global username/email

        I used the following commands.

        1. git add filename.
          to add the file which was modified.

        2. git commit


        *** - Suspicious author real name (key "email")


        *** commit message:
        *** - 2nd line is not empty (key "log")


        *** See http://wiki.qt.io/Early_Warning_System for explanations.
        I got the following messages.

        And i am not using any gui git.

        1 Reply Last reply
        0
        • Pradeep KumarP Offline
          Pradeep KumarP Offline
          Pradeep Kumar
          wrote on last edited by
          #50

          Even if i delete global name and email, i have used local name and email, but still i am getting previous error?.

          JKSHJ 1 Reply Last reply
          0
          • Pradeep KumarP Pradeep Kumar

            Even if i delete global name and email, i have used local name and email, but still i am getting previous error?.

            JKSHJ Offline
            JKSHJ Offline
            JKSH
            Moderators
            wrote on last edited by
            #51

            @Pradeep-Kumar said in Regarding unable to commit the changes in local repository.:

            Even if i delete global name and email, i have used local name and email, but still i am getting previous error?.

            *** - Suspicious author real name (key "email")

            Maybe it doesn't like the dot (.) in your name. What happens if you set your name to just "Pradeep Kumar"?

            *** commit message:
            *** - 2nd line is not empty (key "log")

            The system wants you to leave a blank line in your commit message.

            Qt Doc Search for browsers: forum.qt.io/topic/35616/web-browser-extension-for-improved-doc-searches

            1 Reply Last reply
            0
            • Pradeep KumarP Offline
              Pradeep KumarP Offline
              Pradeep Kumar
              wrote on last edited by
              #52

              I removed dot and kept second line empty.
              Same result as previous.!!!!!!

              1 Reply Last reply
              0
              • SGaistS Offline
                SGaistS Offline
                SGaist
                Lifetime Qt Champion
                wrote on last edited by
                #53

                Did you reset the author in your commit ?

                Interested in AI ? www.idiap.ch
                Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                1 Reply Last reply
                0
                • Pradeep KumarP Offline
                  Pradeep KumarP Offline
                  Pradeep Kumar
                  wrote on last edited by
                  #54

                  I used the following command :

                  root@pthinks:~/qt5# git commit -C --reset-author "Pradeep Kumar pradeepkm186@gmail.com"
                  fatal: could not lookup commit --reset-author
                  ???

                  JKSHJ 1 Reply Last reply
                  0
                  • Pradeep KumarP Pradeep Kumar

                    I used the following command :

                    root@pthinks:~/qt5# git commit -C --reset-author "Pradeep Kumar pradeepkm186@gmail.com"
                    fatal: could not lookup commit --reset-author
                    ???

                    JKSHJ Offline
                    JKSHJ Offline
                    JKSH
                    Moderators
                    wrote on last edited by
                    #55

                    @Pradeep-Kumar said in Regarding unable to commit the changes in local repository.:

                    git commit -C --reset-author "Pradeep Kumar pradeepkm186@gmail.com"

                    You've mixed 2 different commands together...

                    Choose one of:

                    • git commit --amend --author "Pradeep Kumar <pradeepkm186@gmail.com>" OR
                    • git commit --amend --reset-author (after you have set user.name and user.email, either locally or globally)

                    If it still doesn't work, post the full error message and the last entry of git log

                    Qt Doc Search for browsers: forum.qt.io/topic/35616/web-browser-extension-for-improved-doc-searches

                    1 Reply Last reply
                    2
                    • Pradeep KumarP Offline
                      Pradeep KumarP Offline
                      Pradeep Kumar
                      wrote on last edited by Pradeep Kumar
                      #56

                      First i used git add filename being in my project folder then ,
                      I have used the command git commit --amend --reset-author after setting my name and email locallly.
                      After this i used the command git log .

                      I got the below

                      commit 9bf95eb9c7ac4e2415c79d4e9d55e8efe3a923a2
                      Author: Pradeep Kumar pradeepkm186@gmail.com
                      Date: Fri Sep 16 10:54:09 2016 +0530

                      Updated submodules.
                      
                      Change-Id: If1195243a052f8cd20079345dbc7b2783e7bf459
                      

                      and i have given the message for which i fixed the bug.

                      After this what has to be done?. guide me further.

                      JKSHJ 1 Reply Last reply
                      0
                      • SGaistS Offline
                        SGaistS Offline
                        SGaist
                        Lifetime Qt Champion
                        wrote on last edited by
                        #57

                        "Updated submodules" ?

                        What exactly are you trying to do for a submission ?

                        Interested in AI ? www.idiap.ch
                        Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                        1 Reply Last reply
                        0
                        • Pradeep KumarP Offline
                          Pradeep KumarP Offline
                          Pradeep Kumar
                          wrote on last edited by
                          #58

                          I modified one of the file in qtbase submodule.

                          After i added the filename which i modified.
                          then i tried git commit --amend --reset-author

                          Is it wrong?.

                          1 Reply Last reply
                          0
                          • SGaistS Offline
                            SGaistS Offline
                            SGaist
                            Lifetime Qt Champion
                            wrote on last edited by
                            #59

                            Then you should explain clearly what you modified and why.

                            The first line of the commit is a small summary of what the patch does, then leave a blank line and after that explain precisely what your patch is about. Take a look at other submissions to see how it's done. Not all patches requires tons of description but it should always be clear what it does.

                            Interested in AI ? www.idiap.ch
                            Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                            1 Reply Last reply
                            0
                            • Pradeep KumarP Offline
                              Pradeep KumarP Offline
                              Pradeep Kumar
                              wrote on last edited by
                              #60

                              I explained the purpose in one line and left one line blank and provided the report no:

                              1 Reply Last reply
                              0
                              • Pradeep KumarP Pradeep Kumar

                                First i used git add filename being in my project folder then ,
                                I have used the command git commit --amend --reset-author after setting my name and email locallly.
                                After this i used the command git log .

                                I got the below

                                commit 9bf95eb9c7ac4e2415c79d4e9d55e8efe3a923a2
                                Author: Pradeep Kumar pradeepkm186@gmail.com
                                Date: Fri Sep 16 10:54:09 2016 +0530

                                Updated submodules.
                                
                                Change-Id: If1195243a052f8cd20079345dbc7b2783e7bf459
                                

                                and i have given the message for which i fixed the bug.

                                After this what has to be done?. guide me further.

                                JKSHJ Offline
                                JKSHJ Offline
                                JKSH
                                Moderators
                                wrote on last edited by
                                #61

                                @Pradeep-Kumar said in Regarding unable to commit the changes in local repository.:

                                Change-Id: If1195243a052f8cd20079345dbc7b2783e7bf459
                                

                                OK, there are 2 issues here:

                                1. You have modified an existing commit which was written by someone else: https://codereview.qt-project.org/#/c/159622/

                                  • First, backup all the files you've changed. Then, restore the original commit by calling git reset --hard HEAD~1 and then calling git pull.
                                2. You are in the wrong git repository. This is not qtbase.git!

                                  • Call cd qtbase to enter the qtbase.git repository.

                                And i am not using any gui git.

                                You should. It makes life much easier.

                                Inside qtbase, call git gui to launch the GUI. Click Repository -> Visualize All Branch History. Now, explore the repository: Click on other peoples' commits and study them. (You can see the changes they made, and you can read their commit messages)

                                After this what has to be done?. guide me further.

                                What do you want to do?

                                Your topic says "unable to commit the changes in local repository". Can you commit changes to your local repository now? If yes, then please mark this thread as "solved". If not, tell us what issues you are facing when you try to commit changes to your local repository.

                                If you want to push your changes to the Qt Project, please start a new forum thread. That is a different topic.

                                Qt Doc Search for browsers: forum.qt.io/topic/35616/web-browser-extension-for-improved-doc-searches

                                1 Reply Last reply
                                2
                                • Pradeep KumarP Offline
                                  Pradeep KumarP Offline
                                  Pradeep Kumar
                                  wrote on last edited by Pradeep Kumar
                                  #62

                                  Sorry for that ,

                                  • list item I was trying not to commit remotely, trying to commit locally.

                                  • And i have downloaded git-cola. for gui.

                                  *And i revoked back to original commit and used the command git pull.

                                  I will follow the steps as mentioned in the previous post of this topic,

                                  Thanks,

                                  1 Reply Last reply
                                  0
                                  • SGaistS Offline
                                    SGaistS Offline
                                    SGaist
                                    Lifetime Qt Champion
                                    wrote on last edited by
                                    #63

                                    You can't commit remotely, all commits are local. You can push remotely however you don't have any write access to Qt's repositories. Nobody has, you must pass by the code review process.

                                    Interested in AI ? www.idiap.ch
                                    Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                                    1 Reply Last reply
                                    0
                                    • Pradeep KumarP Offline
                                      Pradeep KumarP Offline
                                      Pradeep Kumar
                                      wrote on last edited by Pradeep Kumar
                                      #64

                                      After the gap i am taking again the qtsource code.

                                      even if i now add file which i modified using git add filename
                                      and use git commit in terminal

                                      root@pthinks:~/qt5/qtbase# git commit

                                      *** Please tell me who you are.

                                      Run

                                      git config --global user.email "you@example.com"
                                      git config --global user.name "Your Name"

                                      to set your account's default identity.
                                      Omit --global to set the identity only in this repository.

                                      fatal: unable to auto-detect email address (got 'root@pthinks.(none)')
                                      root@pthinks:~/qt5/qtbase# git commit

                                      *** Please tell me who you are.

                                      Run

                                      git config --global user.email "you@example.com"
                                      git config --global user.name "Your Name"

                                      to set your account's default identity.
                                      Omit --global to set the identity only in this repository.

                                      fatal: unable to auto-detect email address (got 'root@pthinks.(none)')

                                      Previouly it used to open a editor to fill the description of what has been changed and task no , now directly i am the error.

                                      jsulmJ 1 Reply Last reply
                                      0
                                      • Pradeep KumarP Pradeep Kumar

                                        After the gap i am taking again the qtsource code.

                                        even if i now add file which i modified using git add filename
                                        and use git commit in terminal

                                        root@pthinks:~/qt5/qtbase# git commit

                                        *** Please tell me who you are.

                                        Run

                                        git config --global user.email "you@example.com"
                                        git config --global user.name "Your Name"

                                        to set your account's default identity.
                                        Omit --global to set the identity only in this repository.

                                        fatal: unable to auto-detect email address (got 'root@pthinks.(none)')
                                        root@pthinks:~/qt5/qtbase# git commit

                                        *** Please tell me who you are.

                                        Run

                                        git config --global user.email "you@example.com"
                                        git config --global user.name "Your Name"

                                        to set your account's default identity.
                                        Omit --global to set the identity only in this repository.

                                        fatal: unable to auto-detect email address (got 'root@pthinks.(none)')

                                        Previouly it used to open a editor to fill the description of what has been changed and task no , now directly i am the error.

                                        jsulmJ Offline
                                        jsulmJ Offline
                                        jsulm
                                        Lifetime Qt Champion
                                        wrote on last edited by
                                        #65

                                        @Pradeep-Kumar You get this error because Git does not have user name/email. I don't know what you did recently, but for some reason user name/email disappeared. You need to do what the error message tells you. In general you should read about Git as this issue is completely unrelated to Qt.

                                        https://forum.qt.io/topic/113070/qt-code-of-conduct

                                        1 Reply Last reply
                                        0
                                        • Pradeep KumarP Offline
                                          Pradeep KumarP Offline
                                          Pradeep Kumar
                                          wrote on last edited by
                                          #66

                                          K but when i used git config --local --list , user name and email is present.
                                          Even if name is present , will it show error?.
                                          And we need to rely on git?.

                                          kshegunovK 1 Reply Last reply
                                          0

                                          • Login

                                          • Login or register to search.
                                          • First post
                                            Last post
                                          0
                                          • Categories
                                          • Recent
                                          • Tags
                                          • Popular
                                          • Users
                                          • Groups
                                          • Search
                                          • Get Qt Extensions
                                          • Unsolved