git 로컬 프로젝트push 원격 창고로

7499 단어 필기
컨디션
시스템:windows
디렉토리: D:/workspace/idea/spark-test
원격 웨어하우스:https://github.com/HanlaoTwo/SparkStudy.git
프로토콜:https
버전 라이브러리 만들기
#   
git init

Reinitialized existing Git repository in D:/workspace/idea/spark-test/.git/

#   git add  Git,        :
git add *
warning: LF will be replaced by CRLF in src/main/scala/sql/SparkSQLExample.scala.
The file will have its original line endings in your working directory.
warning: LF will be replaced by CRLF in .idea/compiler.xml.
The file will have its original line endings in your working directory.
warning: LF will be replaced by CRLF in .idea/encodings.xml.
The file will have its original line endings in your working directory.
warning: LF will be replaced by CRLF in .idea/misc.xml.
The file will have its original line endings in your working directory.
warning: LF will be replaced by CRLF in .idea/modules.xml.
...

#  
git commit -m "all is new"
[master (root-commit) 521cf14] all is new
warning: LF will be replaced by CRLF in .idea/compiler.xml.
The file will have its original line endings in your working directory.
warning: LF will be replaced by CRLF in .idea/encodings.xml.
The file will have its original line endings in your working directory.
warning: LF will be replaced by CRLF in .idea/misc.xml.
The file will have its original line endings in your working directory.
warning: LF will be replaced by CRLF in .idea/modules.xml.

원격 저장소로 전송
#  
git remote add origin https://github.com/HanlaoTwo/SparkStudy.git
#
fatal: remote origin already exists.

#  
git remote rm origin
#   
git remote add origin https://github.com/HanlaoTwo/SparkStudy.git

#  
git push -u origin master
Username for 'https://github.com': hanlaotwo
Password for 'https://[email protected]':
Counting objects: 294, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (279/279), done.
Writing objects:  99% (292/294), 1.10 MiB | 68.00 KiB/s

좋은 웹페이지 즐겨찾기