warning: LF will be replaced by CRLF in

Git 2019. 5. 20. 09:53
반응형

https://reiphiel.tistory.com/entry/git-handle-newline

 

Git를 이용한 개행문자 핸들링

개발을 진행하다 보면 크게 의식하지는 않지만 신경써야 하는 것이 바로 개행문자입니다. 본 아티클에서는 버전관리시스템(VCS : Version Control System)중 하나인 Git를 이용해서 개행문자를 핸들링하고 관리하..

reiphiel.tistory.com

https://gmlwjd9405.github.io/2018/05/25/git-add-cancle.html

 

[Git] git add 취소하기, git commit 취소하기, git push 취소하기 - Heee's Development Blog

Step by step goes a long way.

gmlwjd9405.github.io

https://blog.jaeyoon.io/2018/01/git-crlf.html

 

Git 에러 CRLF will be replaced by LF (혹은 반대) 핸들링하는 방법

맥/리눅스 이용 개발자와 윈도우 개발자가 협업할 때 왜 발생할까? 터미널에 git 명령어를 입력했는데 다음과 같은 에러가 뜨는 경우가 있다: ```bash warning: CRLF will be replaced by LF in some/file

blog.jaeyoon.io

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
smilejsu@DESKTOP-T44LUPV MINGW64 /d/workspace/unity/git/unity-astar-test (master)
$ git add .
 
smilejsu@DESKTOP-T44LUPV MINGW64 /d/workspace/unity/git/unity-astar-test (master)
$ git status
On branch master
Your branch is up to date with 'origin/master'.
 
Changes to be committed:
  (use "git reset HEAD <file>..." to unstage)
 
        modified:   Logs/Packages-Update.log
        modified:   Packages/manifest.json
        modified:   ProjectSettings/ProjectVersion.txt
 
 
smilejsu@DESKTOP-T44LUPV MINGW64 /d/workspace/unity/git/unity-astar-test (master)
$ git reset HEAD *
Unstaged changes after reset:
M       Logs/Packages-Update.log
M       Packages/manifest.json
M       ProjectSettings/ProjectVersion.txt
 
smilejsu@DESKTOP-T44LUPV MINGW64 /d/workspace/unity/git/unity-astar-test (master)
$ git status
On branch master
Your branch is up to date with 'origin/master'.
 
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:   Logs/Packages-Update.log
        modified:   Packages/manifest.json
        modified:   ProjectSettings/ProjectVersion.txt
 
no changes added to commit (use "git add" and/or "git commit -a")
 
smilejsu@DESKTOP-T44LUPV MINGW64 /d/workspace/unity/git/unity-astar-test (master)
$ git log
commit 6f4f0e8e95a7d1a6aa8bdd47b655e2f7d0c0ac15 (HEAD -> master, origin/master, origin/HEAD)
Author: smilejsu82 <50188795+smilejsu82@users.noreply.github.com>
Date:   Fri May 17 18:18:51 2019 +0900
 
    display f=g+h
 
commit 919214c454b6f31f80ce7b2415e7a9d9aa433534
Author: smilejsu82 <50188795+smilejsu82@users.noreply.github.com>
Date:   Fri May 17 17:47:37 2019 +0900
 
    search node
 
commit edafd16e656f2d377ae8176b164994a84f4cba36
Author: smilejsu82 <50188795+smilejsu82@users.noreply.github.com>
Date:   Fri May 17 16:27:37 2019 +0900
 
    create map
 
commit 8cd00165090fb07e4f1bcf006dbbeda6358fba9d
Author: smilejsu82 <50188795+smilejsu82@users.noreply.github.com>
Date:   Fri May 17 12:00:54 2019 +0900
 
    init project
 
commit 2d6883e8abd66b94fc43c59e0a5e05bbcbcb4dad
Author: smilejsu82 <50188795+smilejsu82@users.noreply.github.com>
Date:   Fri May 17 11:01:48 2019 +0900
 
    Initial commit
(END)
 
smilejsu@DESKTOP-T44LUPV MINGW64 /d/workspace/unity/git/unity-astar-test (master)
^C
 
smilejsu@DESKTOP-T44LUPV MINGW64 /d/workspace/unity/git/unity-astar-test (master)
$ git add *
warning: LF will be replaced by CRLF in Packages/manifest.json.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in ProjectSettings/ProjectVersion.txt.
The file will have its original line endings in your working directory
The following paths are ignored by one of your .gitignore files:
Assembly-CSharp.csproj
Library
Temp
obj
unity-astar-test.sln
Use -if you really want to add them.
 
smilejsu@DESKTOP-T44LUPV MINGW64 /d/workspace/unity/git/unity-astar-test (master)
$ git reset head *
Unstaged changes after reset:
M       Logs/Packages-Update.log
M       Packages/manifest.json
M       ProjectSettings/ProjectVersion.txt
 
smilejsu@DESKTOP-T44LUPV MINGW64 /d/workspace/unity/git/unity-astar-test (master)
$ git status
On branch master
Your branch is up to date with 'origin/master'.
 
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:   Logs/Packages-Update.log
        modified:   Packages/manifest.json
        modified:   ProjectSettings/ProjectVersion.txt
 
no changes added to commit (use "git add" and/or "git commit -a")
 
smilejsu@DESKTOP-T44LUPV MINGW64 /d/workspace/unity/git/unity-astar-test (master)
$ git add .
warning: LF will be replaced by CRLF in Packages/manifest.json.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in ProjectSettings/ProjectVersion.txt.
The file will have its original line endings in your working directory
 
smilejsu@DESKTOP-T44LUPV MINGW64 /d/workspace/unity/git/unity-astar-test (master)
$
 
smilejsu@DESKTOP-T44LUPV MINGW64 /d/workspace/unity/git/unity-astar-test (master)
$ git reset head *
Unstaged changes after reset:
M       Logs/Packages-Update.log
M       Packages/manifest.json
M       ProjectSettings/ProjectVersion.txt
 
smilejsu@DESKTOP-T44LUPV MINGW64 /d/workspace/unity/git/unity-astar-test (master)
$ git config --global core.autocrlf true
 
smilejsu@DESKTOP-T44LUPV MINGW64 /d/workspace/unity/git/unity-astar-test (master)
$ git add .
warning: LF will be replaced by CRLF in Packages/manifest.json.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in ProjectSettings/ProjectVersion.txt.
The file will have its original line endings in your working directory
 
smilejsu@DESKTOP-T44LUPV MINGW64 /d/workspace/unity/git/unity-astar-test (master)
$ git reset head *
Unstaged changes after reset:
M       Logs/Packages-Update.log
M       Packages/manifest.json
M       ProjectSettings/ProjectVersion.txt
 
smilejsu@DESKTOP-T44LUPV MINGW64 /d/workspace/unity/git/unity-astar-test (master)
$ git config --global core.safecrlf false
 
smilejsu@DESKTOP-T44LUPV MINGW64 /d/workspace/unity/git/unity-astar-test (master)
$ git add .
 
smilejsu@DESKTOP-T44LUPV MINGW64 /d/workspace/unity/git/unity-astar-test (master)
$
 
smilejsu@DESKTOP-T44LUPV MINGW64 /d/workspace/unity/git/unity-astar-test (master)
$
 
 

 

반응형

'Git' 카테고리의 다른 글

Git과 Sourcetree 사용하기  (0) 2022.01.12
Git 에러 CRLF will be replaced by LF (혹은 반대) 핸들링하는 방법  (0) 2020.06.05
eclipse target runtime is not defined  (0) 2019.05.03
Permission denied  (0) 2019.05.02
git 알아보기  (0) 2019.05.02
: