본문 바로가기

git merge4

Git branch & conflict(5) Git branch here $git branch here $git log --all --graph --oneline * 0bd18f7 (HEAD -> master, here) ABCD Branch here 생성. Git checkout here $git checkout here switched to branch 'here' $git log --all --graph --oneline * 0bd18f7 (HEAD -> here, master) ABCD Branch here 로 전환 work.txt 수정 Git commit -am "AHCH" $git add work.txt $git commit -m "AHCH" [here 78cd700] AHCH Git checkout master $git checkout.. 2024. 2. 19.
Git branch & conflict(4) Git branch o2 Branch o2 생성. $git branch o2 $git log --all --graph --oneline * 698fa33 (HEAD -> master, o2) work 1 work.txt 수정 Git commit -am "master work 2" staging area에 work.txt add 및 "master work 2" 버전 생성. $git commit -am "master work 2" $git log --all --graph --oneline * 4565142 (HEAD -> master) master work 2 * 698fa33 (o2) work 1 Git checkout o2 $git checkout o2 switched to branch 'o2' $git.. 2024. 2. 18.
Git branch & conflict(3) Git branch o2 $git branch o2 새로운 branch인 o2 생성. branch o2와 master를 merge 하는 작업 진행. master.txt 생성하고 2 추가. Git add master.txt $git add master.txt master.txt를 staging area에 add해줘 Git commit -m "work 2" $git commit -m "work 2" "work 2" 버전 생성해줘. Version "work 2"가 생성되었음을 확인. $git log work 2 work 1 Git commit --amend 이미 commit을 했지만 Commit message 수정하고 싶을때. Commit message를 "work 2" -> "master work 2"로 수.. 2024. 2. 18.
Git branch & conflict(2) Branch apple로 전환 $git checkout apple Switched to branch 'apple' $git log --all --oneline b4fd2ea (master) master work 4 29b7cde (HEAD -> apple, ms, google) work 3 5d08221 work 2 e1f1cc4 work 1 work.txt 에 apple work 4 추가 apple.txt 생성 파일상태 확인 $git status modified: work.txt Untracked files: apple.txt Git add 현재 디렉토리의 모든 파일을 Staging area에 add $git add Git commit -m "apple work 4" apple work 4 버전 생성 .. 2024. 2. 18.