반응형

특히 git pull 한다고 해서 remote의 내용을 다 가져오는 것이 아니고 특정 branch만 가져오는 것

git pull remote명 branch명을 생략해서 쓰다보니 헷갈리는데 사실은 remote명 local branch명:remote branch명이 생략된 것

remote명은 보통 default인 origin을 쓰므로 origin이 생략된 것이고

branch명은 local에 --set-upstream으로 지정을 해두었으면 그 지정된 branch가 tracking branch로 사용됨, remote와 local의 쌍을 이름을 다르게 하면 매우 헷갈리므로 그렇게는 거의 안쓰므로 보통 local remote동일한 branch명으로 연결해둠

 

tracking branch 지정하기

  • git push --set-upstream origin master = git push -u origin master
  • 한번 tracking branch로 지정해두면 향후 git push/fetch/full 할 때 이후는 생략가능

 

그런 줄 알았는데 git pull 하니까 dev2nd, master둘다 pull함, 특정한 한 브랜치 아니고 tracking branch전부가 대상인듯 

 

반응형
반응형
반응형
반응형
/^\d{1,7}$/.test(refCost.current.value)

postgreSQL numeric(10,3)이면 숫자가 최대 7자, 소수점 3자리까지 가능

7자리 넘으면 에러 발생, 7자리 체크위해서 regex사용가능

제한없이 숫자만 입력받으려면 {1,7} -> +로 변경

/^\d+$/.test(refCost.current.value)

 

반응형
반응형

/^\d+$/.test('123') true

/^\d+$/.test(123) true

/^\d+$/.test(123.0) true -> 123.0을 string으로 변환한후에 체크하는 듯

/^\d+$/.test('123.0') false

/^\d+$/.test('123r') false

 

Number.isInteger(123) true

Number.isInteger(123.0) true

Number.isInteger(123.1) false

Number.isInteger('123') false

반응형
반응형

1) text-align: left/center/right;

block 요소안의 inline 요소를 정렬할 때 사용

다른 요소들이 없을때 가능-어떤것 오른쪽으로 어떤건 왼쪽으로 이렇게 하려면 flex를 이용해야 함

 

2) display: flex, justify-content: flex-start/center/flex-end;

 

1) 2) 샘플 참고: https://hianna.tistory.com/837

 

그런데 위의 1) 2)는 바로 위 부모 밑에 모든 애들이 다 한 방향으로 정렬되게 되어 있음

기본은 좌측정렬이고 마지막만 우측정렬하려면

3) display: flex, justify-content: flex-start/center/flex-end; 설정해두고 우측 정렬할 것만 margin-left: auto

참고: https://smthousand.tistory.com/28 

 

 

1) 2) 3) 모두 바로 위 부모 밑 자식에게 적용가능함

할아버지 할머니에 비교해서 왼쪽 정렬되게 하려면

4) position: absolute 이용

할아버지 할머지는 position: relative로 설정, 우측 정렬하고 싶은 손주는 position: absolute, right:0

 

 

5) display: flex, justify-content: space-between 해주면 2개자식이 있을 때 최대한 멀리 떨어뜨려줌, 자식이 3개일때는?

6) display: flex, 첫번째 자식을 display:flex, flex-grow:1 해주면 됨 왜그런지는?

반응형
반응형
  • CSS: url
  • HTML
    • link: href
    • link아닌 경우(이미지 비디오 등): src
반응형
반응형
react-router-dom
반응형
반응형
반응형
반응형
반응형
반응형
반응형

+ Recent posts