我有一个git存储库,它有两个远程源,如下所示 -
origin https://gitlab.com/harshit.laddha/Angulr.git (fetch)
origin https://gitlab.com/harshit.laddha/Angulr.git (push)
origin2 https://gitlab.com/harshit.laddha/aarthik.git (fetch)
origin2 https://gitlab.com/harshit.laddha/aarthik.git (push)
我在根目录中有一个GruntFile.js,它最初是从origin1中提取的,然后我从origin2中提取了一些其他代码,这些代码也有GruntFile.js 现在,这个GruntFile.js被两个存储库中的git自动合并。 但我试过了
git add .
然后git commit -m "message"
但是当我做git status
Changes not staged for commit:
(use "git add <file>..." to update what will be committed)
(use "git checkout -- <file>..." to discard changes in working directory)
modified: GruntFile.js
提交后我做了git push origin dashboard
然后我也会在git status
我还检查了我的远程源存储库中是否存在正确的合并更改,但它仍向我显示相同的git状态消息。
我该如何解决这个问题?
[UPDATE] 我的.gitattributes的内容是
* text eol=lf
git status显示一些关于某些文件的警告消息,如下所示
warning: CRLF will be replaced by LF in client/src/js/app/contact/contact.js.
The file will have its original line endings in your working directory.
warning: CRLF will be replaced by LF in client/src/js/app/note/note.js.
The file will have its original line endings in your working directory.
warning: CRLF will be replaced by LF in client/src/tpl/blocks/header.music.html.
The file will have its original line endings in your working directory.
warning: CRLF will be replaced by LF in client/src/tpl/layout.html.
The file will have its original line endings in your working directory.
warning: CRLF will be replaced by LF in client/src/tpl/music.home.html.
The file will have its original line endings in your working directory.
warning: CRLF will be replaced by LF in client/src/tpl/music.mtv.detail.html.
The file will have its original line endings in your working directory.
warning: CRLF will be replaced by LF in client/src/tpl/music.mtv.html.
The file will have its original line endings in your working directory.
warning: CRLF will be replaced by LF in client/src/tpl/music.playlist.html.
The file will have its original line endings in your working directory.
warning: CRLF will be replaced by LF in client/src/tpl/page_lockme.html.
The file will have its original line endings in your working directory.
warning: CRLF will be replaced by LF in client/src/tpl/page_post.html.
The file will have its original line endings in your working directory.
warning: CRLF will be replaced by LF in client/src/tpl/page_profile.html.
The file will have its original line endings in your working directory.
warning: CRLF will be replaced by LF in client/src/tpl/page_search.html.
The file will have its original line endings in your working directory.
warning: CRLF will be replaced by LF in client/src/tpl/ui_portlet.html.
The file will have its original line endings in your working directory.
warning: CRLF will be replaced by LF in client/src/tpl/ui_timeline.html.
The file will have its original line endings in your working directory.
warning: CRLF will be replaced by LF in client/src/tpl/ui_widgets.html.
The file will have its original line endings in your working directory.
但我在git状态下看到的文件是GruntFile.js,这些警告中没有这些