Git-Create a new project on github and upload local files to the project

Github new project

Insert picture description here

Pull the new project to the local

git clone XXX地址

Insert picture description here

Local code upload

Put the local code in the project folder

Insert picture description here

Enter the project folder

Insert picture description here

Add code to the buffer

git add .        (注:别忘记后面的.,此操作是把项目文件夹下面的文件都添加进来)

Insert picture description here
Warning appears to be a normal phenomenon, because LFand CRLFis actually a newline character, but the difference is that it LFis the newline character of Linux and Unix systems, and it CRLFis the newline character of Windows system. This brings problems to cross-platform collaborative projects. Which standard is used to save files? gitIn order to solve this problem, a "newline automatic conversion" function is provided, and this function is in the "automatic mode" by default, that is, it is turned on.
This newline automatic conversion will automatically convert the newline method of your code that is different from your current operating system into the current system's newline method (ie the conversion between LF and CRLF), so that when you submit the code At that time, even if you haven't modified a certain file, git thinks that you have modified it, thus prompting"LF will be replaced by CRLF“

Solution reference:

Submit code

git commit  -m  "提交信息"  (注:“提交信息”里面换成你需要,如“first commit”)

git push -u origin master   (注:此操作目的是把本地仓库push到github上面,此步骤需要你输入帐号和密码)

Insert picture description here
Although my warning here says that some files exceed the recommended maximum file size, they are actually uploaded successfully!
Insert picture description here

reference:

Guess you like

Origin blog.csdn.net/qq_45779334/article/details/112231991