์ผ | ์ | ํ | ์ | ๋ชฉ | ๊ธ | ํ |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | |||
5 | 6 | 7 | 8 | 9 | 10 | 11 |
12 | 13 | 14 | 15 | 16 | 17 | 18 |
19 | 20 | 21 | 22 | 23 | 24 | 25 |
26 | 27 | 28 | 29 | 30 | 31 |
- UIKit
- Kuring
- ํจ์คํธ์บ ํผ์ค
- realm
- Xcode
- arkit
- TCA
- BOJ
- swift
- Swfit
- ios
- tableView
- designpattern
- combine
- node.js
- SnapKit
- Lv2
- MVVM
- SwiftUI
- ๋ฐฑ์ค
- reactorkit
- CollectionView
- Flutter
- raywenderlich
- BFS
- visionOS
- ํ๋ก๊ทธ๋๋จธ์ค
- rxcocoa
- RxSwift
- XCTest
- Today
- Total
๋ชฉ๋กgit (6)
lgvv98
xcode .gitignore .gitignore ๊ณ์ ์ถ๊ฐํ๊ธฐ ๋ฒ๊ฑฐ๋ก์์,, https://gitignore.io gitignore.io Create useful .gitignore files for your project www.toptal.com ์๋ ์ฝ๋๋ฅผ ์ถ๊ฐํด์ฃผ์ธ์:) # Created by https://www.gitignore.io/api/xcode,swift,cocoapods # Edit at https://www.gitignore.io/?templates=xcode,swift,cocoapods ### CocoaPods ### ## CocoaPods GitIgnore Template # CocoaPods - Only use to conserve bandwidth / Save time on..
์์คํธ๋ฆฌ ์ ์ญ gitignore ํด๊ฒฐํ๊ธฐ โ ์ด๊ฒ ๋ฌด์จ์๋ฆฌ์ธ๊ฐ.. ๋ด๊ฐ ์ด์ ์ ๊ฐ๋ฐํ๋๋ฐ ํ๋์ ํ์ผ์ด ์ถ์ ์ด ๋์ง ์์์. ๋ญ ๋์ถฉ ์์์ ์ ์ญ gitignore๋๊ณ ์๊ตฌ๋ ์๋๋ฐ, ์ด๊ฑธ ๊ทธ๋์ ์ด๋์ ์ค์ ํ๋๊ฑด๋ฐ?? ํ ๋ช๊ฐ์ ๊ฐ ํด๊ฒฐ ๋ชปํด์, ๋ค๋ฅธ ๋ฐฉ์์ผ๋ก ํ์ผ์ ๊ด๋ฆฌํ๊ณ ์๋ค๊ฐ ์ง์ง ์ผ๋จ๊ฒฐ์ ๊ทธ ํด๊ฒฐ๋ฐฉ๋ฒ์ ์ฐพ๊ฒ ๋์ด์ ๋๋ ํด๊ฒฐํ์์. ๋น์์ ๊ตฌ๊ธ๋ง์ ์ง์ง ์์ฒญ๋๊ฒ ํด๋ ์๋ ์ ํ๋๋๊ณ ์ฐ์ธํ๊ณ ,, ๋ง ๊ทธ๋ฌ์๋๋ฐ,, ์ผ๋ง ์ ์ ์๋ก ๋ค์ด๊ฐ ํ๋ก์ ํธ์ ํ ๋ถ๋ ๋๊ฐ์ ํ์์ ๊ฒช์ด์ ํด๊ฒฐํ์ง ๋ชปํด์ ์ด๋ ค์์ ๊ฒช๊ณ ์์์!! ๋ฐ๋ก ๊ทธ ์๋ฆฌ์์ ํด๊ฒฐํด ๋๋ฆฌ๊ณ ๋์ ๊ฐ์ ์ฌ๋ฌ ์ฌ๋๋ค์๊ฒ ๊ธฐ์ฌํ๊ณ ์ ํด๊ฒฐ๋ฐฉ๋ฒ์ ํฌ์คํ ์ผ๋ก ๋จ๊ธฐ๊ณ ์ ํจ. ๐ฅ ๊ฐ ๋ณด ์ ๊ณ ๐ฅ โ ํด๊ฒฐ ๋ฐฉ๋ฒ โ ์ค์ ๋๋ฅด๊ธฐ โ Git ๋ถ๋ถ ํ์ธ..
git stash โ ๊น ์ฌ์ฉ๋ฒ์ ๋ํด์ ์์๋ณด์. ๋ด๊ฐ ์์ ์ ํ๊ณ ์๋๋ฐ, ๋ค๋ฅธ ์์ ์์ ์ฝ๋๋ก ์ธํ์ฌ ๊น์ ๋ณ๊ฒฝ์ฌํญ์ด ๋ฐ์ํจ. pull ํด์ผํ๋๋ฐ ๊ทธ๋ผ ๋ด๊ฐ ์์ฑํ ์ฝ๋๋ ์ด๋๋ก ๊ฐ๊น?? ๊ทธ๋ด ๋ ์ฌ์ฉํ๋๊ฒ ๋ฐ๋ก git stash์ด๋ค. ๊น ์คํ์๋ก ๋ด๊ฐ ์์ฑํ ์ฝ๋๋ฅผ ์์ ์ ์ฅํด๋๊ณ , ์๊ฒฉ ์ ์ฅ์์ ์๋ ์ฝ๋๋ฅผ pull๋ก ๋น๊ฒจ์จ๋ค. ๊ทธ ํ์ ๋ค์ git stash apply๋ฅผ ํตํด ํฉ์น๋ฉด ์ถฉ๋์์ด ์ฌ์ฉํ ์ ์๋ค. (์ฐธ๊ณ ) https://github.com/yeoseon/tip-archive/issues/16
โ ์ด๋ฒ ์๊ฐ์๋ git ํน์ ํ์ผ๋ง commitํ๊ณ pushํ๋ ๊ฒ์ ๋ํด์ ์์๋ณผ ์์ ์ด์ผ. โ ํด๋์ ๊ตฌ์กฐ Root folder - folder A - folder B ํ์ฌ ์ด๋ ๊ฒ ๋์ด์๋ ์ํฉ์ด์ผ. ๋๋ folder A๋ง ๊นํ๋ธ์ ์ฌ๋ฆฌ๊ณ ์ถ๊ณ , folder B๋ ์กฐ๊ธ ๋์ค์ ์ฌ๋ฆฌ๊ณ ์ถ์์ด. ์๋ํ๋ฉด ์์ง ์์ฑ๋์ง ์์๊ธฐ ๋๋ฌธ์ด์ง. โ ์ฌ์ฉํ ๋ช ๋ น์ด ์ ๋ฆฌ // git status๋ช ๋ น์ด๋ฅผ ์ด์ฉํ์ฌ ์์ ํ ํ์ผ ๋ชฉ๋ก ํ์ธํ๊ธฐ git status // git diff๋ช ๋ น์ด๋ฅผ ์ด์ฉํ์ฌ ๊ธฐ์กดํ์ผ์ ๋ณ๊ฒฝ๋ด์ญ ํ์ธํ๊ธฐ git diff // git add๋ช ๋ น์ด๋ฅผ ์ด์ฉํ์ฌ ์ํ๋ ํ์ผ ์ถ๊ฐํ๊ธฐ git add ... // git reset๋ช ๋ น์ด๋ฅผ ์ด์ฉํ์ฌ add๋ ํ์ผ ์ทจ์ํ๊ธฐ git reset HEAD ์ฐ์ git..
โ ์๊ฒฉ ์ ์ฅ์์์ README.md ํ์ผ์ ์ง์ ๋ณ๊ฒฝํ ํ, ๋ก์ปฌ ์ ์ฅ์์ ๋ฐ์ํ๋ ๋ฒ์ ๋ํด์ ์์๋ณผ ์์ ์ด์ผ. ์๊ฒฉ ์ ์ฅ์์ ์ ๊ทผํ๊ธฐ ์ํด ์๊ฒฉ ์ ์ฅ์ ๋ด์ฉ ์ ๋ฐ์ดํธ ํ, git pull $ git remote update $ git stash $ git pull git stash๋ 1๋ฒ์ดํ 3๋ฒ(2๋ฒ์ ๊ฑด๋๋ฐ๊ณ ) ์คํํ์ ์, error: Your local changes to the following files would be overwritten by merge: README.md Please commit your changes or stash them before you merge. Aborting ์์ ๊ฐ์ ์๋ฌ๊ฐ ๋๋ฉด 2๋ฒ์ ๋ฃ์ด์ ์ฒ๋ฆฌํด์ฃผ๋ฉด ๋
์ด๋ฒ์๋ ๊น ์๊ฒฉ ์ ์ฅ์์ ์ฌ๋ผ๊ฐ commit ๋๋๋ฆฌ๋ ๋ฒ์ ๋ํด์ ์์๋ณด์. (๋ฌธ์ ) ๊นํ๋ธ์ ์๋์ผ๋ก ํ์ผ์ ์ถ๊ฐํ์๋๋ฐ, ๋์ค์ ์๊ณ ๋ณด๋๊น ์ฝ๋๊ฐ ์๋ชป๋์์์. ๋ฐ๋ผ์ ๊น ํ๋ธ์์ ๋ค์ ์์ ํ ํ์๊ฐ ์๊น. ํ์ง๋ง, ๋จ์ผ ํ์ผ์ด ์๋๋ผ, ์ฌ๋ฌ ํด๋๋ฅผ ํ๋์ ๋ญ์ณ๋๋ ๋ฐฉ์์ด๋ผ์ ์ด๋ป๊ฒ ํด์ผํ ์ง ๊ณ ๋ฏผ์ด ์๊น. (๋์ ํด๊ฒฐ๋ฒ) 1. Xcode - Source Control - Clone ์ ํด๋ฆญํด ํด๋๋ก ๋์ด์๋ ๊น์ ๋ฐ์์จ๋ค. 2. Terminal์ ์ด๊ณ clone์ด ๋ ๊ณณ์ผ๋ก ์ด๋ํ๋ค. ex) cd Document/"ํด๋ก ๋์ด์ง ํด๋ ์ด๋ฆ" 3. ๊ทธ ์ดํ ๊นํ๋ธ ํํ์ด์ง์ ๋ค์ด๊ฐ์ ํด๋์ ๋ค์ด๊ฐ commit์ ๋๋ฌ ๋์๊ฐ๊ณ ์ ํ๋ ์์ ์ commit id(?)๋ฅผ ๋ณต์ฌํ๋ค.\ 4. ํด๋ก ๋ ๊ณณ์ผ๋ก ์ด๋ํ ..