Cloudera CDH/CDP 및 Hadoop EcoSystem, Semantic IoT등의 개발/운영 기술을 정리합니다. gooper@gooper.com로 문의 주세요.
----.git폴더를 삭제하고 다시 git에 추가하고 서버(bitbucket.org)의 gooperone계정에 반영하는 방법
1. 현재 상태 확인
gooper@gooper-PC MINGW64 /c/dev/workspace/gsdaf (dev)
$ git status
fatal: Not a git repository (or any of the parent directories): .git
2. .git폴더가 없으므로 새로 생성하여 초기화 해줌
gooper@gooper-PC MINGW64 /c/dev/workspace/gsdaf
$ git init
Initialized empty Git repository in C:/dev/workspace/gsdaf/.git/
3. 원격저장소를 로컬과 연결함
gooper@gooper-PC MINGW64 /c/dev/workspace/gsdaf (master)
$ git remote add origin https://gooperone@bitbucket.org/gooperone/gsda.git
4. master에 push하려 하지만 오류발생함
gooper@gooper-PC MINGW64 /c/dev/workspace/gsdaf (master)
$ git push -u origin master
error: src refspec master does not match any.
error: failed to push some refs to 'https://gooperone@bitbucket.org/gooperone/gsda.git'
5. 파일목록 확인
gooper@gooper-PC MINGW64 /c/dev/workspace/gsdaf (master)
$ ls
build.gradle gsda-client/ gsda-common/ gsda-doc/ gsda-web/ LICENSE pom.xml README.md src/
6. 현재 상태 확인
gooper@gooper-PC MINGW64 /c/dev/workspace/gsdaf (master)
$ git status
On branch master
Initial commit
Untracked files:
(use "git add <file>..." to include in what will be committed)
LICENSE
README.md
gsda-client/
gsda-common/
gsda-doc/
gsda-web/
pom.xml
src/
nothing added to commit but untracked files present (use "git add" to track)
7. 현재 폴더 내용을 git에 등록함
gooper@gooper-PC MINGW64 /c/dev/workspace/gsdaf (master)
$ git add *
The following paths are ignored by one of your .gitignore files:
build.gradle
Use -f if you really want to add them.
warning: LF will be replaced by CRLF in gsda-common/src/main/java/com/gooper/icbms/sda/comm/conf/ExceptionHelper.java.
The file will have its original line endings in your working directory.
warning: LF will be replaced by CRLF in gsda-common/src/main/java/com/gooper/icbms/sda/comm/kafka/avro/COL_ONEM2M.java.
The file will have its original line endings in your working directory.
warning: LF will be replaced by CRLF in gsda-common/src/main/java/com/gooper/icbms/sda/comm/kafka/avro/COL_RDBMS.java.
The file will have its original line endings in your working directory.
warning: LF will be replaced by CRLF in gsda-common/src/main/java/com/gooper/icbms/sda/kb/context/routine/ICBMSContext.java.
The file will have its original line endings in your working directory.
warning: LF will be replaced by CRLF in gsda-common/src/main/java/com/gooper/icbms/sda/kb/context/routine/ICBMSDeviceContext.java.
The file will have its original line endings in your working directory.
warning: LF will be replaced by CRLF in gsda-common/src/main/java/com/gooper/icbms/sda/kb/context/routine/ICBMSLocationContext.java.
The file will have its original line endings in your working directory.
warning: LF will be replaced by CRLF in gsda-common/src/main/java/com/gooper/icbms/sda/kb/context/routine/ICBMSPersonalContext.java.
The file will have its original line endings in your working directory.
warning: LF will be replaced by CRLF in gsda-common/src/main/java/com/gooper/icbms/sda/kb/dto/OneM2MContainerType.java.
The file will have its original line endings in your working directory.
warning: LF will be replaced by CRLF in gsda-common/src/main/java/com/gooper/icbms/sda/kb/dto/SurveyInfoDTO.java.
The file will have its original line endings in your working directory.
warning: LF will be replaced by CRLF in gsda-common/src/main/java/com/gooper/icbms/sda/kb/dto/UserInOutInfoDTO.java.
The file will have its original line endings in your working directory.
warning: LF will be replaced by CRLF in gsda-common/src/main/java/com/gooper/icbms/sda/kb/mapper/onem2m/OneM2MSubscribeUriMapper.java.
The file will have its original line endings in your working directory.
warning: LF will be replaced by CRLF in gsda-common/src/main/java/com/gooper/icbms/sda/kb/mapper/service/AttendanceServiceMapper.java.
The file will have its original line endings in your working directory.
warning: LF will be replaced by CRLF in gsda-common/src/main/java/com/gooper/icbms/sda/kb/mapper/service/PresenceServiceMapper.java.
The file will have its original line endings in your working directory.
warning: LF will be replaced by CRLF in gsda-common/src/main/java/com/gooper/icbms/sda/kb/mapper/service/SurveyServiceMapper.java.
The file will have its original line endings in your working directory.
warning: LF will be replaced by CRLF in gsda-common/src/main/java/com/gooper/icbms/sda/kb/mapper/service/UserInOutServiceMapper.java.
The file will have its original line endings in your working directory.
warning: LF will be replaced by CRLF in gsda-common/src/main/java/com/gooper/icbms/sda/kb/model/ICBMSContextConditionModel.java.
The file will have its original line endings in your working directory.
warning: LF will be replaced by CRLF in gsda-common/src/main/java/com/gooper/icbms/sda/kb/query/DeviceResource.java.
The file will have its original line endings in your working directory.
warning: LF will be replaced by CRLF in gsda-common/src/main/resources/log4j.xml.
The file will have its original line endings in your working directory.
warning: LF will be replaced by CRLF in gsda-doc/build_eclipse.md.
The file will have its original line endings in your working directory.
warning: LF will be replaced by CRLF in gsda-doc/configuration.md.
The file will have its original line endings in your working directory.
warning: LF will be replaced by CRLF in gsda-doc/quick-start.md.
The file will have its original line endings in your working directory.
warning: LF will be replaced by CRLF in gsda-web/src/main/webapp/WEB-INF/config/action-servlet.xml.
The file will have its original line endings in your working directory.
warning: LF will be replaced by CRLF in gsda-web/src/main/webapp/WEB-INF/config/log4j.xml.
The file will have its original line endings in your working directory.
8. 다시 상태 확인
gooper@gooper-PC MINGW64 /c/dev/workspace/gsdaf (master)
$ git status
On branch master
Initial commit
Changes to be committed:
(use "git rm --cached <file>..." to unstage)
new file: LICENSE
new file: README.md
new file: gsda-client/pom.xml
new file: gsda-client/src/main/java/com/gooper/icbms/sda/hbase/onem2m/AvroOneM2MDataToHBaseSubscribe.java
.......
new file: gsda-client/src/test/java/com/gooper/icbms/sda/sda_client/AppTest.java
new file: gsda-common/pom.xml
new file: gsda-common/src/main/java/com/gooper/icbms/sda/comm/SchComm.java
.....
new file: gsda-doc/build_eclipse.md
new file: gsda-web/pom.xml
new file: gsda-web/src/main/java/com/gooper/icbms/sda/itf/ci/controller/CiController.java
......
new file: src/main/webapp/WEB-INF/jsp/sample/boardList.jsp
new file: src/main/webapp/WEB-INF/web.xml
new file: src/main/webapp/index.jsp
9. 첫번재 커밋수행
gooper@gooper-PC MINGW64 /c/dev/workspace/gsdaf (master)
$ git commit -m "First Commit."
[master (root-commit) 8f1a2c9] First Commit.
346 files changed, 38605 insertions(+)
create mode 100644 LICENSE
create mode 100644 README.md
create mode 100644 gsda-client/pom.xml
create mode 100644 gsda-client/src/main/java/com/gooper/icbms/sda/hbase/onem2m/AvroOneM2MDataToHBaseSubscribe.java
....
create mode 100644 gsda-client/src/test/java/com/gooper/icbms/sda/sda_client/AppTest.java
create mode 100644 gsda-common/pom.xml
create mode 100644 gsda-common/src/main/java/com/gooper/icbms/sda/comm/SchComm.java
......
create mode 100644 gsda-common/src/main/resources/mybatis-config.xml
create mode 100644 gsda-doc/build_eclipse.md
create mode 100644 gsda-web/src/main/java/com/gooper/icbms/sda/itf/ci/controller/CiController.java
.....
create mode 100644 pom.xml
create mode 100644 src/main/java/com/gooper/icbms/sda/comm/common/THJobTest1.java
....
create mode 100644 src/main/webapp/index.jsp
10. master 브랜치에 push수행
gooper@gooper-PC MINGW64 /c/dev/workspace/gsdaf (master)
$ git push -u origin master
Counting objects: 466, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (403/403), done.
Writing objects: 100% (466/466), 302.18 KiB | 0 bytes/s, done.
Total 466 (delta 157), reused 0 (delta 0)
To https://bitbucket.org/gooperone/gsda.git
* [new branch] master -> master
Branch master set up to track remote branch master from origin.
gooper@gooper-PC MINGW64 /c/dev/workspace/gsdaf (master)
$
댓글 0
번호 | 제목 | 날짜 | 조회 수 |
---|---|---|---|
13 | [bitbucket] 2022년 3월 2일 부터 git 작업시 기존에 사용하던 비빌번호를 사용할 수 없도록 변경되었다. | 2022.04.30 | 495 |
12 | 원격에 있는 git를 받은후 기존repository삭제후 새로운 리포지토리에 연결하여 소스 등록 | 2019.07.13 | 698 |
11 | 원격 리포지토리에서 최초 clone시 Permission denied (publickey). 오류발생시 조치사항 | 2017.06.20 | 1305 |
» | .git폴더를 삭제하고 다시 git에 추가하고 서버에 반영하는 방법 | 2017.06.19 | 4864 |
9 | Eclipse 에서 bitbucket.org 연동 하기 | 2017.06.08 | 848 |
8 | 원격의 origin/master를 기준으로 dev branch를 만들어 작업후 원격의 origin/dev에 push하는 방법 | 2016.11.22 | 859 |
7 | .gitignore파일에 지정되지 않은 파일이 ignore되는 경우 확인방법 | 2016.11.22 | 849 |
6 | github에 있는 프로젝트와 로컬에서 작업한 프로젝트 합치기 | 2016.11.22 | 859 |
5 | 특정 커밋 시점(commit id를 기준으로)으로 돌리기(reset) | 2016.11.21 | 608 |
4 | Github를 이용하는 전체 흐름 이해하기 | 2016.11.18 | 269 |
3 | 특정 단계의 commit상태로 만들기(이렇게 하면 중간에 반영된 모든 commit를 history가 삭제된다) | 2016.11.17 | 876 |
2 | git 초기화(Windows에서 Git Bash사용) | 2016.11.17 | 1102 |
1 | git설명 한글판 | 2015.12.09 | 502 |