9

Git . Git .

Git , . , , .

gitignore

Git : git add, () git commit.

, , - .

, . () git add, Git.

git commit, , .

, , , Git , git ignore.

, , Git ? .gitignore.

, .gitignore, . , Git .


.gitignore? ?

Git :

  • , Git. , ( git add) ( git commit) .
  • , , ( git add).
  • , , Git . , Git , .

, , .gitignore.

.gitignore , , Git .

.gitignore Git , . , Git .


.gitignore

.gitignore . . , .

, . , .gitignore.

, .gitignore Unix- , macOS Linux, , (, macOS Terminal.app). , .gitignore , , , cd :

touch .gitignore

, ., .

, ls. , , , -a ls :

ls a

.gitignore

.gitignore , .

, , , .

, :

  • . , macOS, Windows Linux, , , . , macOS Finder .DS_Store, , .
  • , , IDE (Integrated Development Environment ). , , .idea.
  • , , , , .o.
  • , , , npm node_modules. , , .
  • , . ( ) , .env ( .env API, ).
  • , .log. , , .

Git

, .

, text.txt, , :

/text.txt

text.txt, test , :

/test/text.txt

:

test/text.txt

, .

, text.txt, .gitignore :

text.txt

. , .

, , :

test/

( ) test, .

, , , :

#        test
test       

, , ?

, , img. , *:

img*

, img.

, , ?

, *, .

, , .md, .gitignore :

*.md

.md, .

, , . , ?

, .gitignore :

.md

, .md, , , , Git README.md.

( ), , , :

 #    .md
.md

#    README.md
!README.md      

.gitignore, , .md , README.md.

, , .

, test:

test/

, test example.md, .

:

#      test
test/

#        
!test/example.md

.gitignore , , , .

Git , .

, , , - ?

, .env, .

.gitignore, .env:

#   .env  .gitignore
echo ".env" >> .gitignore       

, Git , :

git rm --cached .env

git rm --cached , . , , .

git status , , ls , .

, --cached.

.gitignore git add:

git add .gitignore

, .gitignore git commit:

git commit -m "update ignored files"

, Git.


50% Merion Academy