git使用心得
来源:互联网 发布:centos分辨率设置 编辑:程序博客网 时间:2024/06/10 00:49
总结下最常使用的git命令,废话少说,直接上干货。
1)git初始化
这个新手一般很少遇见,但是如果要使用类似github这样的git仓库,第一个肯定是如何创建git的问题。
在github上先创建自己的仓库源,然后做以下操作1> git账户的录入 git config --global user.name "Your Name" git config --global user.email you@example.com 全局的通过vim ~/.gitconfig来查看 git config user.name "Your Name" git config user.email you@example.com 局部的通过当前路径下的 .git/config文件来查看 也可以修改提交的用户名和Email: git commit --amend --author='Your Name <you@example.com>'2> git init (初始化本地git)3> git remote add origin git@github.com:*/*.git4> git add -A5> git commit -a -m 'blablabla'6> git push -u origin master -f
2)查看git已设配置
git config --list
git clone <span style="font-family: Arial, Helvetica, sans-serif;">git@github.com:*/*.git</span>
4)git推送代码
1> git add xxx(git add -A是准备add所有代码)2> git commit -a -m 'xxx' 3> git push(如果失败需查看是否有冲突)
5)git分支
git branch
git stash
0 0
- Git使用心得
- git使用心得
- Git的使用心得
- git repo使用心得
- git 使用心得
- git repo使用心得
- git repo使用心得
- git使用心得笔记
- git repo使用心得
- Git 使用心得
- Git使用心得
- Git使用心得
- git 使用心得
- git命令使用心得
- git 使用心得
- git使用心得
- git使用心得
- Git简单使用心得
- 供给侧也好,需求侧也好,都只是个名词
- 使用FloatingActionButton无法浮现在ListView的原因
- CodeForces 1B Spreadsheets
- MFC_CTreeView—树形视图类
- c#基本知识:泛型集合的使用
- git使用心得
- 传智播客168期JavaEE就业班(第六天 Dom4j)
- iptables之显示扩展基础应用(二)
- An error occurred while processing the post-install hook of the Podfile.undefined method `project`
- locationInView 和translationInView这个两个方法的区别
- Java—java方法重载
- IT产品质量保证测试矩阵
- 【UVa】[210]Concurrency Simulator
- 多个Excel文件的第一个工作表(Sheet)合并到一个Excel文件的多个工作表里