GitHub使用教程
来源:互联网 发布:淘宝刻章违法吗 编辑:程序博客网 时间:2024/06/16 12:06
1.找到GitBash并打开
git config –global user.name “用户名”
git config –global user.email “邮箱”
去掉用户名和邮箱可以检查配置是否成功
2.创建仓库
cd 指定文件目录
C:/Users/lenovo/Desktop/MyApplication/lbstest
git init
3.提交代码
只需要使用add和commit命名就可以
git add 文件
git add 文件夹
git add . (所有文件)
提交命名
git commit -m “描述信息”
4.查看修改内容
git status
git diff(查看修改的内容,如果你想查看到指定文件的修改,把全路径传入进去)
5.撤销未提交的修改
git checkout 文件的全路径
git reset 文件的全路径(针对于已经git add的文件)
6.查看提交信息
git log
git log id -1 -p 查看具体提交了什么信息,+表示添加,-表示删除
7.创建分支
git branch version 版本号
git branch 可以查看创建成功与否
git checkout version版本号(切换到分支上)
将分支上的代码合并到主支上
git checkout master
git merge version版本号
git branch -D version版本号 删除分支
8.与远程版本库协作
git clone 地址(下载代码)
git push origin master(同步到远程版本库上)
远程版本库上的修改同步到本地,下载到本地并且合并代码
git fetch origin master
git diff origin master
git merge origin master
或者
git pull origin master
- github使用教程 ~
- github使用教程
- github简单使用教程
- github简单使用教程
- github简单使用教程
- github简单使用教程
- github 简单使用教程
- github简单使用教程
- github使用教程
- github简单使用教程
- TortoiseGit GitHub使用教程
- GIThub简单使用教程
- github入门使用教程
- github简单使用教程
- github简单使用教程
- github简单使用教程
- github使用教程
- github简单使用教程
- Android 6.0动态申请权限实践及遇到的坑
- 51Nod-1536-不一样的猜数游戏
- 【分享】食灵12卷全+追傩之章 漫画合集
- Python多个装饰器的顺序
- hdu1087最长(最大)上升子序列
- GitHub使用教程
- Codeforces Round #392 (Div. 2) A.Holiday Of Equality
- Codeforces Round #392 (Div. 2) B - Blown Garland
- Scala学习笔记(0) 导言
- QT开发--Visual Studio2013--配置代码32bit、64bit环境
- OpenCV开发中的一些笔记
- Leetcode 394. Decode String
- one way of bitwise operation of C using struct
- Troubleshooting Segmentation Violations/Faults