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.
QtWS25 Last Chance

Regarding unable to commit the changes in local repository.

Scheduled Pinned Locked Moved Unsolved General and Desktop
67 Posts 6 Posters 31.9k Views
  • 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.
  • S Offline
    S Offline
    SGaist
    Lifetime Qt Champion
    wrote on 29 Aug 2016, 21:28 last edited by
    #2

    Hi,

    Where are you calling git from ? Qt Creator ? Command line ?

    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
    1
    • P Offline
      P Offline
      Pradeep Kumar
      wrote on 30 Aug 2016, 04:43 last edited by
      #3

      I am calling from Qt creator.

      Pradeep Kumar
      Qt,QML Developer

      1 Reply Last reply
      0
      • S Offline
        S Offline
        SGaist
        Lifetime Qt Champion
        wrote on 30 Aug 2016, 07:00 last edited by
        #4

        Silly question but is git correctly configured in Qt Creator ?

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

        P 1 Reply Last reply 30 Aug 2016, 07:26
        0
        • S SGaist
          30 Aug 2016, 07:00

          Silly question but is git correctly configured in Qt Creator ?

          P Offline
          P Offline
          Pradeep Kumar
          wrote on 30 Aug 2016, 07:26 last edited by
          #5

          @SGaist

          I followed Configuring the git from Qt Contribution guidelines.
          and followed the same. And i have made the documentation. below is the steps. Is their any mistake while configuring the Git. Please let me know if i am missing any steps or commands.?

          Configuring the Git

             download the git if it is not installed in your system using the command : sudo apt-get git install
          
          1) We need to have all files in the repository , so type the below command.
          
             git config --global core.autocrlf input
          
          2) We need to provide commitor information correctly, so that we can commit and push it to server.
          
          3) Dont use nick names, provide the specific names which was provided for Gerrit account.
          
          4) Gerrit will not accept the commits unless the committer information matches the email address(es) you registered. 
          
          5) Below are the commands to be provided.
          
             git config --global user.name "username"                             // within the double quotes provide username, provided 												   to Gerrit
          
             git config --global user.email "emailid"				// within the double quotes provide email, provided 												   to Gerrit
          
          
          6) It is necessary to install Qt commit message template , the command is provided below:
          
              git config --global commit.template
          
          7) It is necessary to show git in git stat or git commit, the command is provided below.
          
              git config --global status.showuntrackedfiles all
          
          8) git push will push all branches to the upstream repository, which is almost never what user want. the command is provided below to 		    fix this.
          
              git config --global push.default tracking
          
          9) Conflicts has to be resolved, git does not provide the by default , so the command is provided below.
          
              git config --global rerere.enabled true
              git config --global rerere.autoupdate true
          
          10) git pull will provide changes from upstream, but it is not provdided by default ,the below command is used for that.
          
              git config --global rebase.stat true
          
          11) to provide the colour patches for the differences , provide the below command.
          
              git config --global color.ui auto
              git config --global core.pager "less -FRSX"	
          
          12) Git also support alias and the command is provided below.
          
              git config --global alias.di diff
              git config --global alias.ci commit
              git config --global alias.co checkout
              git config --global alias.ann blame
          

          Thanks,
          git config --global alias.st status

          Pradeep Kumar
          Qt,QML Developer

          1 Reply Last reply
          0
          • V Offline
            V Offline
            VRonin
            wrote on 30 Aug 2016, 07:50 last edited by VRonin
            #6

            Silly question but did you stage the files to commit?

            Try using a GUI client just for git ( https://git-scm.com/download/gui/linux ). I use Git Extensions (but I run Windows)

            "La mort n'est rien, mais vivre vaincu et sans gloire, c'est mourir tous les jours"
            ~Napoleon Bonaparte

            On a crusade to banish setIndexWidget() from the holy land of Qt

            1 Reply Last reply
            1
            • P Offline
              P Offline
              Pradeep Kumar
              wrote on 30 Aug 2016, 07:58 last edited by
              #7

              May i know what is stage the files to commit?.

              Pradeep Kumar
              Qt,QML Developer

              J 1 Reply Last reply 30 Aug 2016, 08:14
              0
              • P Pradeep Kumar
                30 Aug 2016, 07:58

                May i know what is stage the files to commit?.

                J Offline
                J Offline
                jsulm
                Lifetime Qt Champion
                wrote on 30 Aug 2016, 08:14 last edited by
                #8

                @Pradeep-Kumar git add FILE

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

                1 Reply Last reply
                2
                • V Offline
                  V Offline
                  VRonin
                  wrote on 30 Aug 2016, 08:30 last edited by
                  #9

                  git status will also tell you what is staged and what isn't

                  "La mort n'est rien, mais vivre vaincu et sans gloire, c'est mourir tous les jours"
                  ~Napoleon Bonaparte

                  On a crusade to banish setIndexWidget() from the holy land of Qt

                  1 Reply Last reply
                  1
                  • P Offline
                    P Offline
                    Pradeep Kumar
                    wrote on 30 Aug 2016, 09:06 last edited by
                    #10

                    i used git status command and it showed me list which was not staged and
                    as @jsulm said i used git add filenames which i modified.

                    Pradeep Kumar
                    Qt,QML Developer

                    1 Reply Last reply
                    0
                    • V Offline
                      V Offline
                      VRonin
                      wrote on 30 Aug 2016, 09:20 last edited by
                      #11

                      Then you are done, just call git commit

                      "La mort n'est rien, mais vivre vaincu et sans gloire, c'est mourir tous les jours"
                      ~Napoleon Bonaparte

                      On a crusade to banish setIndexWidget() from the holy land of Qt

                      1 Reply Last reply
                      1
                      • P Offline
                        P Offline
                        Pradeep Kumar
                        wrote on 30 Aug 2016, 09:22 last edited by
                        #12

                        k i will use the command git commit.
                        But is their any wrong in the above document which i posted?.

                        Pradeep Kumar
                        Qt,QML Developer

                        1 Reply Last reply
                        0
                        • P Offline
                          P Offline
                          Pradeep Kumar
                          wrote on 30 Aug 2016, 09:52 last edited by
                          #13

                          *** Suspicious changes in commit HEAD ( filepath):


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


                          *** commit message:
                          *** - Hint: Aim for shorter summaries


                          *** examples/sql/doc/src/cachedtable.qdoc:
                          *** - Style issues (key "style")
                          *** 53: Trailing whitespace
                          *** 54: Trailing whitespace


                          *** See http://wiki.qt.io/Early_Warning_System for explanations.

                          Pradeep Kumar
                          Qt,QML Developer

                          1 Reply Last reply
                          0
                          • P Offline
                            P Offline
                            Pradeep Kumar
                            wrote on 30 Aug 2016, 09:55 last edited by
                            #14

                            I found this messages after i used git command , where i provided the information.
                            What does it represent.

                            Pradeep Kumar
                            Qt,QML Developer

                            1 Reply Last reply
                            0
                            • S Offline
                              S Offline
                              SGaist
                              Lifetime Qt Champion
                              wrote on 30 Aug 2016, 10:14 last edited by
                              #15

                              Check the configuration of git particularly the email and name you provided.

                              The first line of your commit is too long. IIRC It shouldn't be more than 72 character.

                              The long version of the commit message should be below after one empty line. Note that the line length is still a rule to be followed.

                              Remove all useless whitespaces you added on lines 53 and 54 of from cachedtale.qdoc

                              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
                              1
                              • P Offline
                                P Offline
                                Pradeep Kumar
                                wrote on 30 Aug 2016, 10:25 last edited by
                                #16

                                I used the command to check git config --list, below was the contents.

                                core.autocrlf=input
                                core.pager=less -FRSX
                                status.showuntrackedfiles=all
                                push.default=tracking
                                rerere.enabled=true
                                rerere.autoupdate=true
                                rebase.stat=true
                                color.ui=auto
                                alias.di=diff
                                alias.ci=commit
                                alias.co=checkout
                                alias.ann=blame
                                alias.st=status
                                user.email=pradeepkm186@gmail.com
                                user.name=pradeep_kumar.m

                                Is the configuration wrong?.

                                Pradeep Kumar
                                Qt,QML Developer

                                J 1 Reply Last reply 14 Sept 2016, 05:53
                                0
                                • S Offline
                                  S Offline
                                  SGaist
                                  Lifetime Qt Champion
                                  wrote on 30 Aug 2016, 10:37 last edited by
                                  #17

                                  The name is wrong. It's not a "username". When you contribute to Qt it should match the name you used for the Gerrit account. In your case, likely "Pradeep Kumar".

                                  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
                                  1
                                  • P Offline
                                    P Offline
                                    Pradeep Kumar
                                    wrote on 30 Aug 2016, 11:16 last edited by
                                    #18

                                    Username pradeep_kumar.m
                                    Full Name Pradeep Kumar.M
                                    Email Address pradeepkm186@gmail.com

                                    this is from Gerrit account.

                                    Pradeep Kumar
                                    Qt,QML Developer

                                    1 Reply Last reply
                                    0
                                    • P Offline
                                      P Offline
                                      Pradeep Kumar
                                      wrote on 30 Aug 2016, 13:00 last edited by
                                      #19

                                      @SGaist

                                      Commit button is enabled , it was parsing i had to wait for a while.
                                      sorry was being impatient.

                                      Another query is i am getting the below error

                                      Cannot commit 1 file(s):
                                      *** 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 'pradeep@pthinks.(none)')

                                      Please provide further guidance?.
                                      Thanks,

                                      Pradeep Kumar
                                      Qt,QML Developer

                                      1 Reply Last reply
                                      0
                                      • S Offline
                                        S Offline
                                        SGaist
                                        Lifetime Qt Champion
                                        wrote on 30 Aug 2016, 13:02 last edited by
                                        #20

                                        Did you forgot the extension after @pthinks ?

                                        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
                                        1
                                        • P Offline
                                          P Offline
                                          Pradeep Kumar
                                          wrote on 30 Aug 2016, 13:10 last edited by
                                          #21

                                          nope i have given gmail account

                                          git config --global user.name "pradeep_kumar.m"
                                          git config --global user.email "pradeepkm186@gmail.com"

                                          but still y it is not working?.
                                          its taking 'pradeep@pthinks.(none) by default. i have no clue from where.

                                          Pradeep Kumar
                                          Qt,QML Developer

                                          1 Reply Last reply
                                          0

                                          11/67

                                          30 Aug 2016, 09:20

                                          topic:navigator.unread, 56
                                          • Login

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