Daily Develope

[Git] 기본 명령어 (init / Add / commit) 본문

Git

[Git] 기본 명령어 (init / Add / commit)

noggame 2022. 1. 7. 19:16

ㅇ 목차

- 신규 생성/등록

- Add / Commit

- Merge (합병)

 


신규 생성/등록
git init
git add {file}					# 업데이트할 파일 추가
git commit -m "{message}"			# 업데이트시 기록할 메시지 등록
git remote add {remote_name} {remote_url}	# remote_name으로 원격 저장소 주소 기록
git push -u {remote_name} {branch_name}		# remote_name의 branch_name 업데이트

 


Add / Commit

ㅇ 전체 파일 일괄적으로 add 및 commit

git commit -a -m "{message}"

 

ㅇ Add된 파일 취소

git restore {file_name}

 

ㅇ Commit 취소

git reset HEAD {target_filename}

 


 

Comments