# python3_doc **Repository Path**: JiuTianRuanBa/python3_doc ## Basic Information - **Project Name**: python3_doc - **Description**: python3的相关知识,包括anaconda、python3、pip3等 - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 1 - **Created**: 2022-02-09 - **Last Updated**: 2022-02-09 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README ## 本地目录和远程Git仓库的关联 ### 前提:设置Git账号 ```shell git config --global user.name "jinpenghy" git config --global user.email "5624525+jinpenghy@user.noreply.gitee.com" ``` ### 第一种情况:本地还未有git库名相同的目本地录 ```shell ## 前提:远程git创建同名库 cd python3_doc git init touch README.md git add README.md git commit -m "first commit" git remote add origin https://gitee.com/jinpenghy/python3_doc.git git push -u origin master ``` ### 第二种情况:本地已有目录上传至Git ```shell cd python3_doc git remote add origin https://gitee.com/jinpenghy/python3_doc.git git push -u origin master ``` ### 本店仓库被修改乱了,需要远程仓库强制覆盖本地仓库 ```shell # 下载远程仓库信息,不考虑合并和rebase git fetch --all # 将分支重置为刚获取内容。 --hard更改工作树中的所有文件以匹配origin/master中的文件 git reset --hard origin/master # origin/ git pull ```