# gitstudy **Repository Path**: tianruiqi/gitstudy ## Basic Information - **Project Name**: gitstudy - **Description**: No description available - **Primary Language**: C - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2021-08-14 - **Last Updated**: 2021-08-14 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README 初始化 git init 删除初始化 rm -rf .git 连接远程仓库 git remote add origin 仓库地址 查看连接的仓库 git remote -v 在用户目录 产生公钥 ssh-keygen -t rsa 建立屏蔽目录 .gitignore *.log /temp 创建并切换到分支 git checkout -b 分支名 添加本地需要提交的代码 git add . (.表示所有代码) 提交代码并添加说明 git commit -m “说明内容” 上传代码到新分支 git push origin 本地分支名:远程分支名 (若远程分支不存在会新建) 查看本地分支 git branch 查看远程分支 git branch -a 远程拉取分支代码 先创建本地文件夹,再git bash here 初始化 git init 连接远程仓库 git remote add origin 仓库地址 拉取代码 git fetch origin 远程分支名 新建本地分支并拉取代码 git checkout -b 本地分支名 origin/远程分支名 克隆指定分支代码 git clone -b 分支名 仓库地址