git

github 파일 수정방법

tonirr 2020. 2. 10. 01:24

1. git status

  1) 수정한 파일이 있는 경우

On branch master 
Your branch is up to date with 'origin/master'. 

 

Changes not staged for commit: 
  (use "git add ..." to update what will be committed) 
  (use "git restore ..." to discard changes in working directory) 
        modified:   src/main/java/com/example/logintest_1/filter/LoginFilter.java 

no changes added to commit (use "git add" and/or "git commit -a") 

 

  2) 수정한 파일이 없는 경우

On branch master
Your branch is up to date with 'origin/master'.

nothing to commit, working tree clean

 

2. git add 경로/수정파일

  git add src/main/java/com/example/logintest_1/filter/LoginFilter.java 

  --> 경로도 같이 입력해주어야 함

 

3. git push