赞
踩
git config --global user.email “you@example.com” you@example.com 替换为你的邮箱
git config --global usr.name “Your Name” Your Name 替换为你的用户名
1 git init
//初始化仓库
2 git add .
//添加当前目录下的所有文件到暂存区
3 git commit -m "first commit"
//将暂存区内容添加到仓库中,并打上备注信息first commit
4 git branch -M main
//创建主分支main
5 git remote add origin https://github.com/xiaolizero/8723du.git
//添加远程版本库:
6 git push -u origin main
//关联到远程的master 分支
git config --global -l //查看git配置
git add .
git commit -m "first commit"
git push
列出所有分支
git branch
git branch -d (branchname) //删除分支命令
创建一个叫做“feature_x”的分支,并切换过去:
git checkout -b fex
切换回主分支:
git checkout master
//master为你的主分支
git branch -d fex
//删掉新建分支
git remote -v
//显示所有远程仓库:
git status
// 查看在你上次提交之后是否有对文件进行再次修改。
git stash
//贮藏修改
git stash drop
//删除贮藏
git pull
//更新你的本地仓库至最新改动
git merge <branch>
//合并其他分支到当前分支
git add <filename>
//告诉冲突已经解决
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。