Notice
Recent Posts
Recent Comments
Link
투케이2K
3. (Bitbucket/Git) [BitBucket] [맥북] Android 비트 버킷 프로젝트 및 저장소 생성 git 명령어 사용해 pull , commit , push 수행 본문
비트버킷 & Git
3. (Bitbucket/Git) [BitBucket] [맥북] Android 비트 버킷 프로젝트 및 저장소 생성 git 명령어 사용해 pull , commit , push 수행
투케이2K 2022. 7. 18. 13:19[환경 설정]
저장소 : Bitbucket / Git
사용 목적 : 소스 코드 버전 관리 실시
[참고 사항]
1. Commit : 로컬 저장소에 소스코드를 저장하는 것입니다.
2. Push : Git 에 실제로 소스코드를 반영하는 것입니다.
3. Pull : Git 에 등록된 소스코드를 내려받는 것입니다.
[사전 설정 사항]
1. 맥북에서 Xcode 설치로 git 이 설치 되어 있는 상황
2. 만일, git 이 설치 되어 있지 않은 경우 git 설치 필요

[방법 설명]









# [맥북에서 터미널 실행]
# [cd 명령어를 사용해 안드로이드 프로젝트까지 이동 수행 실시]
# [프로젝트 내에서 git init 초기화]
lo@loui-MacBookPro Two2kManager % git init
>> .git 파일 목록 확인 : ls -a
>> .git 파일 삭제 및 init 재수행 위함 : rm -rf .git
# [git 에 올리기 위해 소스 코드 전체 선택 실시]
lo@loui-MacBookPro Two2kManager % git add --all
# [커밋 수행 및 멘트 저장 실시]
lo@loui-MacBookPro Two2kManager % git commit -m "init"
# [비트 버킷에서 복사한 주소 설정 실시]
lo@loui-MacBookPro Two2kManager % git remote add origin https://KwonGiHwan@bitbucket.org/KwonGiHwan/android-two2kmanager.git
>> 기존에 저장된 remote 저장소가 있어서 에러가 발생하는 경우 삭제 수행 : git remote remove origin
# [기존 소스코드 pull 당겨 받기]
lo@loui-MacBookPro Two2kManager % git pull --ff-only origin master
# [git 에 적용 push 설정 수행 실시]
lo@loui-MacBookPro Two2kManager % git push origin master
# [생성한 앱 비밀번호 고유값 입력 실시]

반응형
'비트버킷 & Git' 카테고리의 다른 글
Comments