☀️

Hi, I am Miao.

something about git

Pragmatism of Git

Clone your repo from GitHub
$ cd d:/repo
$ git clone git@github.com:sunmiao0301/Ceph-Discovery.git
$ cd Ceph-Discovery
# careful
$ git init
  • Do your changes, then:
Push the changed repo to GitHub
$ git status # check
$ git add ./
$ git status # check
$ git commit -m "a message"
$ git status # check
$ git push
$ git status # check

Store-a-large-flie-with-Git-LFS

Download and Install the Git Large File Storage

git-lfs

Set up Git LFS for your user account in your git bash by running:
$ cd d:/repo/BackEndDeveloper
$ git lfs install
In the Git repository where you want to use Git LFS, select the file types you’d like Git LFS to manage (or directly edit your .gitattributes).
$ cd d:/repo/BackEndDeveloper
$ git lfs track "*.pdf" # I wanne upload pdf file
Now make sure .gitattributes is tracked
$ git status
# Untracked files:
  (use "git add <file>..." to include in what will be committed)
        .gitattributes
$ git add .gitattributes
To avoid some errors, commit gitattributes first
$ git commit -m "first for gitattributes"
$ git push
Now, just commit and push to GitHub as you normally would
$ git add D:/repo/BackEndDeveloper/02ComputerNetwork/Computer-Network-A-Top-Down-Approach/计算机网络自顶向下方法原书第7版.pdf
$ git commit -m "push large file"
$ git push

Done

— Jan 5, 2022

Made with ❤ and Hexo.js