Tools/Git

Tools/Git

git add * vs git add .

git add * VS git add . git을 로컬에서 사용할 때 터미널을 이용해서 사용한다. 보통 $ git init $ cat > test.txt $ git add test.txt $ git commit -m " add test.txt " 이런식으로 사용한다. 그러나 파일이 여러개일 경우 $ git add * 로 모든 파일을 staged 상태로 만든다. 그런데 가끔 $ git add *을 하면 다음과 같은 상황이 나올때가 있다. git add * The following paths are ignored by one of your .gitignore files: git-add/ignore.txt Use -f if you really want to add them. 이 말은 .gitignore 에 현..

Tools/Git

[React] create-react-app으로 만든 프로젝트 git repository에 업로드하기

hello-world라는 프로젝트를 hello-people 계정의 repository에 업로드 하는 예시입니다. github repository를 hello-world라고 만들어줍니다. 프로젝트를 create-react-app을 사용해서 만들어줍니다. npx create-react-app hello-world 프로젝트 폴더 내로 이동해줍니다. cd hello-world/ .git 파일이 이미 존재하므로 git init을 하기 위해 지워줍니다. (rm은 언제나 조심해서 사용합시다) rm -rf .git git 환경을 만들어줍니다. git init 만들어준 hello-world repository를 remote로 등록해줍니다. git remote add origin ~~~ create-react-app으로 ..

욱둥
'Tools/Git' 카테고리의 글 목록