Regarding unable to commit the changes in local repository.
-
@Pradeep-Kumar You can remove the duplicates from .git/config file manually using any editor
-
I tried to find two user.name and user.email in config file. but i found their is only one user.name and user.email. how to go further. how to remaove another.
I used the command git config --list outside the project folder.
This was the result.root@pthinks:~# git config --list
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=pradeepk@pthinks.com
user.name=Pradeep Kumar.MIs this impacting the .git/config file?.
-
I tried to find two user.name and user.email in config file. but i found their is only one user.name and user.email. how to go further. how to remaove another.
I used the command git config --list outside the project folder.
This was the result.root@pthinks:~# git config --list
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=pradeepk@pthinks.com
user.name=Pradeep Kumar.MIs this impacting the .git/config file?.
@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.
-
@Pradeep-Kumar It is not related to QtCreator, QtCreator just calls Git. Git uses username/email which is currently configured. If you configured them in your project then Git takes them from PROJECT_DIR/.git/config. If you did not then Git takes them from the global config file (~/.gitconfig). Check what is in PROJECT_DIR/.git/config and fix it if it is wrong.
-
root@pthinks:~/qt5/.git# cat config
[core]
repositoryformatversion = 0
filemode = true
bare = false
logallrefupdates = true
[remote "origin"]
url = git://code.qt.io/qt/qt5.git
fetch = +refs/heads/:refs/remotes/origin/
[branch "5.7"]
remote = origin
merge = refs/heads/5.7
[submodule "qt3d"]
url = git://code.qt.io/qt/qt3d.git
[submodule "qtactiveqt"]
url = git://code.qt.io/qt/qtactiveqt.git
[submodule "qtandroidextras"]
url = git://code.qt.io/qt/qtandroidextras.git
[submodule "qtbase"]
url = git://code.qt.io/qt/qtbase.git
[submodule "qtcanvas3d"]
url = git://code.qt.io/qt/qtcanvas3d.git
[submodule "qtcharts"]
url = git://code.qt.io/qt/qtcharts.git
[submodule "qtconnectivity"]
url = git://code.qt.io/qt/qtconnectivity.git
[submodule "qtdatavis3d"]
url = git://code.qt.io/qt/qtdatavis3d.git
[submodule "qtdeclarative"]
url = git://code.qt.io/qt/qtdeclarative.git
[submodule "qtdoc"]
url = git://code.qt.io/qt/qtdoc.git
[submodule "qtgamepad"]
url = git://code.qt.io/qt/qtgamepad
[submodule "qtgraphicaleffects"]
url = git://code.qt.io/qt/qtgraphicaleffects.git
[submodule "qtimageformats"]
url = git://code.qt.io/qt/qtimageformats.git
[submodule "qtlocation"]
url = git://code.qt.io/qt/qtlocation.git
[submodule "qtmacextras"]
url = git://code.qt.io/qt/qtmacextras.git
[submodule "qtmultimedia"]
url = git://code.qt.io/qt/qtmultimedia.git
[submodule "qtpurchasing"]
url = git://code.qt.io/qt/qtpurchasing.git
[submodule "qtqa"]
url = git://code.qt.io/qt/qtqa.git
[submodule "qtquickcontrols"]
url = git://code.qt.io/qt/qtquickcontrols.git
[submodule "qtquickcontrols2"]
url = git://code.qt.io/qt/qtquickcontrols2.git
[submodule "qtrepotools"]
url = git://code.qt.io/qt/qtrepotools.git
[submodule "qtscript"]
url = git://code.qt.io/qt/qtscript.git
[submodule "qtscxml"]
url = git://code.qt.io/qt/qtscxml
[submodule "qtsensors"]
url = git://code.qt.io/qt/qtsensors.git
[submodule "qtserialbus"]
url = git://code.qt.io/qt/qtserialbus.git
[submodule "qtserialport"]
url = git://code.qt.io/qt/qtserialport.git
[submodule "qtsvg"]
url = git://code.qt.io/qt/qtsvg.git
[submodule "qttools"]
url = git://code.qt.io/qt/qttools.git
[submodule "qttranslations"]
url = git://code.qt.io/qt/qttranslations.git
[submodule "qtvirtualkeyboard"]
url = git://code.qt.io/qt/qtvirtualkeyboard.git
[submodule "qtwayland"]
url = git://code.qt.io/qt/qtwayland.git
[submodule "qtwebchannel"]
url = git://code.qt.io/qt/qtwebchannel.git
[submodule "qtwebsockets"]
url = git://code.qt.io/qt/qtwebsockets.git
[submodule "qtwebview"]
url = git://code.qt.io/qt/qtwebview.git
[submodule "qtwinextras"]
url = git://code.qt.io/qt/qtwinextras.git
[submodule "qtx11extras"]
url = git://code.qt.io/qt/qtx11extras.git
[submodule "qtxmlpatterns"]
url = git://code.qt.io/qt/qtxmlpatterns.git
[commit]
template = /root/qt5/.commit-template
[remote "gerrit"]
url = ssh://codereview.qt-project.org/qt/qt5
fetch = +refs/heads/:refs/remotes/gerrit/
[user]
name = Pradeep Kumar.M
email = pradeepkm186@gmail.comThis is the information present in config file of project directory.
-
This post is deleted!
-
@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.
@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.comIf 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.
- Can you commit from the command line? (Command is
git commit
) - Do you have a git GUI?
- Can you commit from the command line? (Command is
-
I ran two commands separately
Both gave me the user.email different.
i have deleted locally and retained global username/emailI used the following commands.
-
git add filename.
to add the file which was modified. -
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.
-
-
Even if i delete global name and email, i have used local name and email, but still i am getting previous error?.
-
Even if i delete global name and email, i have used local name and email, but still i am getting previous error?.
@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.
-
I removed dot and kept second line empty.
Same result as previous.!!!!!! -
Did you reset the author in your commit ?
-
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
??? -
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
???@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>"
ORgit 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
-
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.
-
"Updated submodules" ?
What exactly are you trying to do for a submission ?
-
I modified one of the file in qtbase submodule.
After i added the filename which i modified.
then i tried git commit --amend --reset-authorIs it wrong?.
-
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.
-
I explained the purpose in one line and left one line blank and provided the report no: