git init
git remote add origin https://gitee.com/XXXX.git
git fetch origin branch_name
git checkout -b local_branch_name origin/remote_branch_name
git pull origin remote_branch_name
Example .gitignore for Vue projects:
.DS_Store
node_modules
/dist
# local env files
.env.local
.env.*.local
# Log files
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
# Editor directories and files
.idea
.vscode
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?
Note that if there are submissions already, we should remove cache before pushing again, or .gitignore would not be working.
git rm -r --cached .
git add .
git commit -m 'update .gitignore'
git push origin remote_branch_name