Regarding unable to commit the changes in local repository.
-
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 +0530Updated 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.
@Pradeep-Kumar said in Regarding unable to commit the changes in local repository.:
Change-Id: If1195243a052f8cd20079345dbc7b2783e7bf459
OK, there are 2 issues here:
-
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 callinggit pull
.
- First, backup all the files you've changed. Then, restore the original commit by calling
-
You are in the wrong git repository. This is not qtbase.git!
- Call
cd qtbase
to enter the qtbase.git repository.
- Call
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.
-
-
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,
-
-
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.
-
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 terminalroot@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.
-
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 terminalroot@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.
@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.
-
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?. -
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?.Firstly, you shouldn't do anything but system maintenance with the root user. Secondly, gerrit, being somewhat smart, will want you to configure your e-mail and name. Here[2] it's written pretty clearly how you should set it up. If I had to guess what the problem is, when pulling the Qt's source for development git pulled the git triggers for you, which would happen if you ran:
perl init-repository --codereview-username <Jira/Gerrit username>
which you should have according to this[1]. Getting the triggers in the local repo is perfectly normal and desirable, so my guess is you can't commit currently just because your name and email aren't configured.
Basically you have all the information in [1], [2] and [3], you just have to follow the instructions. Start by cloning the source with your gerrit username[1], set up gerrit [2] and ultimately use it to push for review[3].
[1]: https://wiki.qt.io/Building_Qt_5_from_Git
[2]: https://wiki.qt.io/Setting_up_Gerrit
[3]: https://wiki.qt.io/Gerrit_Introduction