# studyNotes **Repository Path**: dnmy520/study-notes ## Basic Information - **Project Name**: studyNotes - **Description**: No description available - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2023-10-31 - **Last Updated**: 2023-11-29 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README ### 学习笔记 1. 安装git ``` 设置公钥 ``` 2. 设置用户名及其邮箱 ``` 只需要设置一次 git config --global user.name '枯木逢春' git config --global user.email '2209034371@qq.com' ``` 3. 建立仓库 ``` git init ``` 4. 关联仓库 ``` git remote add origin example(url) ``` 5. 设置跟踪文件,提交本地 ``` git add file|* git commit -m '提交描述' ``` 6. cancel 追踪 ``` git rm file-name 删除暂存与工作 区的file git rm --cached file 只删除暂存区中指定的file git commit -m '描述’ 不提交暂存区,不能切换分支 ``` 7. 推送远程仓库 ``` git push origin '分支' ``` 8. 拉取远程仓库 ``` git pull -u origin '分支' ``` 9. 创建分支 ``` git branch 分支名称 ``` 10. 删除分支 ``` git branch --delete 分支名称 ```