美文网首页
git 记录

git 记录

作者: 饥人谷_Vomx | 来源:发表于2017-05-01 13:29 被阅读0次

git clone ssh地址
生成私钥公钥对,把公钥添加到github上去
操作完毕后
git add . 暂存
git commit -am “addfile”
git push origin master 推送到github远程(仅限第一次push)
touch a.md
echo “hello” > a.md 在文件里写入一个字符串
git status 查看状态
git remote -v 查看本地库里记录的远程库地址
git remote -f origin master 强制推送,会覆盖别人的代码
git remote add xx xx@github.com 添加一个远程库的标签
git remote set-url origin xx.git 修改origin标签对应的地址
git remote rename gitlab coding 修改标签gitlab 为coding
分支操作
创建本地库dev分支
git branch dev
git branch -a 查看所有分支
git checkout dev 切换到dev分支
open . 打开当前文件夹
git push origin dev推送到origin地址的dev分支上

把dev分支上的内容合并到当前分支
git checkout master
git merge dev

相关文章

  • git常用指令

    git log -3 查看3条记录git log origin/master 查看远程记录git reset 回...

  • git查看提交记录详情

    git 查看commit 提交记录详情 git log //查看所有的提交记录 git show //查看最新的提...

  • 2.3 Git 基础 - 查看提交记录

    提交记录git log 2.2 Git 基础 - 记录每次更新到仓库(删除和改名)2.4 Git 基础 - 撤销操...

  • Git常用命令

    git常用命令记录 git提交一个没有任何改动的记录:git commit -m "empty commit" -...

  • git 并不简单啊

    git log 查看历史记录 git log --pretty=oneline 优美的查看历史记录 git res...

  • GIT commit 回退

    git add .git commit -m "xxx" git log // 查看commit记录commit ...

  • log 和 reflog

    git log是查看commit的历史记录。 git reflog是查看所有git操作的历史记录。

  • Git使用记录

    本地Git撤回提交记录 使用git log查看提交的历史记录 使用git reset --soft head~1撤...

  • GIT-Reflog

    1、git reflog : 查看操作记录 2、撤销某次记录 git reset --soft HEAD@{1} ...

  • Git的使用

    star 记录一下Git的使用,逐步用到了,一步一步更新 GIT 常用指令记录 START 记录一下,GIt的使用...

网友评论

      本文标题:git 记录

      本文链接:https://www.haomeiwen.com/subject/kaiftxtx.html