0
点赞
收藏
分享

微信扫一扫

git 常用操作------实战



提交代码流程

增加:git  add    url  (尽量不要用  git add .)

提交:git commit -m   注释

拉取:git pull <remote>  <branch>

推送:git push <remote>  <branch>

查看分支

git  branch -a

切换分支

 git checkout -b 分支名称


查看当前状态(有没有修改的文件等)

git status

查看日志

git  log

把文件改回到之前的某个版本

版本值:git  log  后 commit  后面跟的字符串便是

git checkout   版本值  文件路径


git合并分支

切换到要合并的分支

git pull origin 要合并的分支

切回自己的分支

git  merge 要合并的分支


举报

相关推荐

0 条评论