문서의 이전 판입니다!
/home/x/mydata
이하를 백업한다면, 해당 디렉토리 이하의 디렉토리나 파일들중 ignore할게 있다면 먼저 ignore할 파일, 디렉토리 바로 상위에 .gitignore
를 만들어서 해당 파일/디렉토리를 기입해준다.mydata
리포지토리# 미리 .gitignore 처리 필수 cd /home/x/mydata git init # 혹은 .gitattributes 에 * -text 항목 필요. 불필요한 줄끝형식 변환제거 git config core.autocrlf false git config user.email "your@email.com" git config user.name "Git AutoBackup" git add . git commit -m 'backup initialized' git branch -M main git remote add origin <https://githost.com/path-to-git-backup.git> git push -u origin main