随笔分类 - Git
Git命令及用法
摘要:配置当前的用户名邮箱可以当前项目配置或者全局配置。 仅当前项目配置: git config user.name 'your-user-name' git config user.email 'your-user-email' 全局配置: git config --global user.name '
阅读全文
摘要:$ git clone http://xxx.xxx.cn/liyafei/developer.gitCloning into 'developer'...remote: Counting objects: 10681, done.remote: Compressing objects: 100%
阅读全文
摘要:查看本地分支:git branch -t 合并本地两个分支:git merge branchOne branchTwo 切换分支:git checkout branchName 将本地指定分支推送到远程指定仓库指定分支: git push 远程仓库地址 本地指定分支:远程指定分支 拉取远程指定仓库指
阅读全文
摘要:拉取远端仓库代码: 如果本地已经存在文件夹,先cd进去,然后敲命令: git fetch (作用是拉取远端仓库里的代码) git merge (作用是将远端仓库里的代码与本地仓库里的代码合并,如果有冲突会提示,这时候需要讲不正确的代码删除) 提交本地仓库的代码到远端仓库: git status (作
阅读全文