git新手操作手册

常用配置

git config --global user.name "root"
git config --global user.email "[email protected]"
git config credential.helper store				#保存待会输入的用户名和密码,避免每次都要输入

git clone远程仓库到本地,切换到分支dev,发现没有内容

git checkout dev			#切换到dev分支
git branch					#查看当前所在分支
git pull origin dev			#将远程dev分支pull到当前分支
git push origin dev			#将当前分支push到远程分支dev

分支管理

git branch -a				#查看本地和远程仓库的所有分支
git clone -b <指定分支名> <远程仓库地址>		#直接克隆远程分支到本地

文件管理

git rm 文件名		删除本地分支文件

猜你喜欢

转载自blog.csdn.net/anqixiang/article/details/105858474
今日推荐