Giter Site home page Giter Site logo

til's Introduction

Today I Learned (TIL)

์˜ค๋Š˜ ๋ฐฐ์šด, ์•Œ๊ฒŒ ๋œ, ํ•™์Šตํ•œ ๋‚ด์šฉ ์ •๋ฆฌํ•˜๊ฑฐ๋‚˜
์ž์œ ๋กญ๊ฒŒ ๋Š๋‚€ ์ ์„ ์ ์–ด๋‘๋Š” ์ €์žฅ์†Œ ์ž…๋‹ˆ๋‹ค. โœ๏ธโ˜บ๏ธ

Algorithm

Data structure

Database

til's People

Contributors

jiinheo avatar

Watchers

 avatar

til's Issues

[Git] git checkout ๋ธŒ๋žœ์น˜ ๋ณ€๊ฒฝ ์˜ค๋ฅ˜ (git restore ์ด์šฉ)

feature ๋ธŒ๋žœ์น˜์—์„œ main ๋ธŒ๋žœ์น˜๋กœ ๋ณ€๊ฒฝ์‹œ ์—๋Ÿฌ๋ฐœ์ƒ
git checkout main

*์ฐธ๊ณ 
checkout์€ ๋ธŒ๋žœ์น˜ ๋ณ€๊ฒฝ, ๋ณต๊ตฌ ๋‘๊ฐ€์ง€ ์ƒํ™ฉ์—์„œ ๋ชจ๋‘ ์‚ฌ์šฉ๋˜์–ด switch๋กœ ๋ณ€๊ฒฝ๋จ
git switch main
git switch -c main : ๋ธŒ๋žœ์น˜๋ฅผ ์ƒˆ๋กœ ์ƒ์„ฑํ•˜๊ณ ์ž ํ•  ๋•Œ๋Š” ๊ธฐ์กด์— ์‚ฌ์šฉํ•˜๋˜  -b์˜ต์…˜์„ -c๋กœ ๋ณ€๊ฒฝ

์—๋Ÿฌ๋ฐœ์ƒ

error: Your local changes to the following files would be overwritten by checkout:
	ios-timer-app.xcodeproj/project.xcworkspace/xcuserdata/heojiin.xcuserdatad/UserInterfaceState.xcuserstate
	ios-timer-app/ViewController.swift
Please commit your changes or stash them before you switch branches.

commit ์„ ํ•˜๊ณ  ๋ณ€๊ฒฝํ•œ ๋ถ€๋ถ„์ด ์žˆ์–ด์„œ ์œ„์˜ ์—๋Ÿฌ๊ฐ€ ๋ฐœ์ƒํ•จ

  1. stash ์˜ ๊ฒฝ์šฐ ์œ„์˜ ์—๋Ÿฌ๊ฐ€ ๋‹ค์‹œ ๋ฐœ์ƒ
  2. commit์€ ์›ํ•˜์ง€ ์•Š๊ธฐ ๋•Œ๋ฌธ์— ๋‹ค๋ฅธ ๋ฐฉ๋ฒ•์œผ๋กœ ํ•ด๊ฒฐ

git status

Changes not staged for commit:
  (use "git add <file>..." to update what will be committed)
  (use "git restore <file>..." to discard changes in working directory)
	modified:   ios-timer-app.xcodeproj/project.xcworkspace/xcuserdata/heojiin.xcuserdatad/UserInterfaceState.xcuserstate

(use "git restore ..." to discard changes in working directory)
git restore๋กœ ์ˆ˜์ •ํ•œ ํŒŒ์ผ์„ ๊ธฐ์กด ์ƒํƒœ๋กœ ๋˜๋Œ๋ ค์„œ ํ•ด๊ฒฐ

git restore ํŒŒ์ผ๋ช… : ์ˆ˜์ •ํ•œ ๋‚ด์šฉ์„ ์‚ญ์ œํ•˜๊ณ  ๊ธฐ์กด ์ƒํƒœ๋กœ ๋˜๋Œ๋ฆผ (git checkout๊ณผ ๋™์ผ) 
git restore --staged ํŒŒ์ผ๋ช… : stage๋œ ํŒŒ์ผ์„ ๋˜๋Œ๋ฆผ 

๋ฌธ์ œ๋Š” ๋ธŒ๋žœ์น˜๋ฅผ ๋ณ€๊ฒฝํ• ๋•Œ๋งˆ๋‹ค ๊ณ„์† ์œ„์˜ ์—๋Ÿฌ๊ฐ€ ๋ฐœ์ƒ

[CocoaPods] could not find compatible versions for pod "FirebaseCore" ์„ค์น˜ ์˜ค๋ฅ˜ (pod.lockํŒŒ์ผ ์‚ญ์ œ)

์ด์ „์— pod ํŒŒ์ผ์— Firebase/Database ๋ฅผ ์„ค์น˜ํ–ˆ๊ณ ,
์ดํ›„์— Firestore๋ฅผ ์„ค์น˜ํ•˜๋ ค๊ณ  ํ•˜๋Š”๋ฐ ์˜ค๋ฅ˜ ๋ฐœ์ƒ

<pod ํŒŒ์ผ ์ถ”๊ฐ€>

pod 'Firebase/Firestore'
pod 'Firebase/FireStoreSwift'

$ pod install

์—๋Ÿฌ๋ฐœ์ƒ

image

could not find compatible versions for pod "FirebaseCore"
ํ˜ธํ™˜๋˜๋Š” ๋ฒ„์ „์„ ์ฐพ์„ ์ˆ˜ ์—†๋‹ค๋Š” ์˜ค๋ฅ˜

ํ•ด๊ฒฐ

pod.lock ํŒŒ์ผ ์‚ญ์ œ ํ›„

$pod install

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.