Version Control with Git (Udacity)优达学城笔记--L1:What is Version Control

What is Version Control

version control: control version

Version Cotrol Systems: Git, Subversion, Mercurial

  • Centralized:all users connect to a central, master repository
  • Distributed: each user has the entire repository on their computer

git: Distributed version control system

  • git: Version control tool
  • GitHub: Service that hosts Git projects

version control system(VCS) is a tool that manages different versions of source code.

source code manager(SCM) is another name for a version control system.

Git

commit save the state of your project in Git

repository(repo) is a directory which contains your project work, as well as a few files which are used to communicate with Git.Repositories can exit either locally on your computer or as remote copy on another computer. A repository is made up of commits.

working directory is the files that you see in your computer's file system. When you open your project files up on a code editor, you're working with files in the Working Directory. This is in contrast to the files that have been saved(in commits!) in the repository. When working with Git, the Working Directory is also different from the command line's concept of the current working directory which is the directory that your shell is "looking at" right now.

Checkout is when content in the repository has been copied to the Working Directory.

Staging Area/Staging Index/Index A file in the Git directory that stores information about what will go into your next commit.

SHA is basically an ID number for each commit. It is a 40-character string composed of characters(0-9 and a-f) and calculated based on the contents of a file or directory structure in Git. Secure Hash Algorithm.

Branch is when a new line of development is created that diverges from the main line of development.

Installing Git https://git-scm.com/downloads

git

usage:git [--version] [--help] [-C ] [-c name=value] [--exec-path[=]] [--html-path] [--man-path] [--info-path] [-pl--paginate|--no-pager] [--no-replace-objects] [--bare] [--git-dir=] [--work-tree=] [--namespace=] []

The most commonly used git commands are:

  • Add Add file contents to the index
  • bisect Find by binary search the change that introduced a bug
  • branch List,create,or delete branches
  • checkout Checkout a branch or paths to the working tree
  • clone Clone a repository into a new directory
  • commint Record changes to the repository
  • diff Show changes to the repository
  • fetch Download objects and refs from another repository
  • grep Print lines matching a pattern
  • init Create an empty Git repository or reinitialize an existing one
  • log Show commit logs
  • merge Join two or more development histories together
  • mv Move or rename a file, a directory, or a symlink
  • pull Fetch from and integrate with another repository or a local branch
  • push Update remote refs along with associated objects
  • rebase Forward-port local commits to the updated upstream head
  • reset Reset current HEAD to the specified state
  • rm Remove files from the working tree and from the index
  • show Show various types of objects
  • status Show the working tree status
  • tag Create, list, delete or verify a tag object signed with GPG

'git help -a' and 'git help -g' lists available subcommands and some concept guides. See 'git help ' or 'git help ' to read about a specific subcommand or concept.

Configuration Steps

cd
start .
mv udacity-terminal-config .udacity-terminal-config

First Time Git Configuration

git config --global user.name "<Your-Full-Name>"        #sets up Git with your name

git config --global user.email "<your-email-address>"   #sets up Git with your email

git config --global color.ui auto   #makes sure taht Git output is colored

git config --global merge.conflictstyle diff3   #displays the original state in a conflict

git config --list

associate X text editor with Git

Atom Editor Setup

git config --global core.editor "atom --wait"

Sublime Text Setup

git config --global core.editor "'/Applications/Sublime Text 2.app/Contents/SharedSupport/bin/subl' -n -w"

VSCode Setup

git config --global core.editor "code -wait"
时间: 2024-10-06 08:54:14

Version Control with Git (Udacity)优达学城笔记--L1:What is Version Control的相关文章

商学院:学而优则阔还是阔而优则学

王石婚变成为了被大众消费的话题,一个结果就是让长江商学院以及中国商学院群体受到瞩目.在长江商学院刚刚更新的官网上,2013级EM BA班学费.申请费累计已达70万,比前一年涨了4.2万.尽管好事者渲染商学院和EM BA是"高级婚介所",但大家都明白,那里实际上是建立上层关系网的所在:由于入读该班的非富即贵,能和这些手眼通天者攀上同窗之谊,今后的事业.人生目标,追求起来就会更快.更容易.即便学费再贵,那也是性价比高.投资回报足.失败风险小的划算买卖,"艳遇"云云,不过

为了生得优,活得长,安诺优达、阿里云建了“安诺云”

       云计算正在成为生物医学界的"宠儿",越来越多的BT行业机构选择拥抱云计算,走进DT时代.2016年2月1日,中国基因组行业的知名企业安诺优达基因科技与全球领先的云计算厂商阿里云宣布战略合作计划,双方将合作搭建基于阿里云服务的生物大数据分析云平台"安诺云",实现对高通量基因测序数据的快速分析.安全存储,提供生物大数据存储与管理服务以及生物.临床研究数据分析一体化服务,推动我国精准医学的进程.         根据协议,双方将本着优势互补.互惠互利.共同发

跟益达学Solr5之批量索引JSON数据

     假定你有这样一堆JSON数据,   Json代码   [     {"id":"1", "name":"Red Lobster", "city":"San Francisco, CA", "type":"Sit-down Chain", "state":"California", "tag

跟益达学Solr5之从MySQL数据库导入数据并索引

  最近有小伙伴跟我抱怨说:益达,最近博客更新的有点慢呐.其实不是我变懒了,我是不想因为数量而降低了博客的质量,我需要抱着对你们负责的态度来写每一篇博客,绝不能含糊啊,所以,还望大家多多包涵呐. 今天群里一朋友问我Solr如何对数据库表里的数据进行索引,为此,今晚特地更新此篇博客,这里我以Solr当前最新版本5.1.0,数据库MySQL为例进行讲解说明. 首先我们需要准备一张测试表,如图:      测试表创建好了之后,我们需要让表里插入几条测试数据,如图:  然后需要把E:\solr-5.1.

跟益达学Solr5之使用Tomcat部署Solr

  最近忙着面试以及生活琐事把时间都霸占了,博客拖了4天没更新了,让各位久等了,望多多包涵!不过还好,工作已经敲定了,终于可以安心的学习Solr并分享我学习的点点滴滴啦!         上回我们在Jetty下部署了,不过我想小伙伴们使用Tomcat还是要多点,所以这回我们就来试试把Solr5部署到Tomcat下,这里以Win7 64bit Tomcat7.0.55为例,linux环境下同理,没太大区别:         首先你要去Solr官网下载Solr5.x的zip压缩包,至于怎么下载我这里

跟益达学Solr5之增量索引MySQL数据库表数据

   Solr5中如何增量索引MySQL数据库表中的数据,这个问题之前有某个童鞋问过我,今天午休时间就腾空更新篇博客,希望能帮助到你们.        为了测试方便,我首先从京东网站弄了点测试数据,如图:    这里要声明下,我不是在给京东商城打广告哈,仅仅是随便找个网站弄点测试数据,这部分工作全是我无聊手动插入MySQL数据库中的,如图:  建表SQL以及测试数据,我待会儿会上传到底下的附件里.然后你需要在solrconfig.xml配置文件中启用全量导入和增量导入请求处理器,如图:  然后分

以阿里云为承载,安诺优达开启BT-DT新时代

  近日,安诺优达基因科技在阿里云云栖大会﹒北京峰会上重磅发布"安诺云--基因大数据分析云平台",在阿里云上全面开启安诺优达BT-DT时代新篇章. 精准医疗强调以个体的基因组信息为依据进行个性化的诊治和健康管理,而基因测序作为精准医疗的基础,在生物医学领域得到了广泛应用,成为临床转化应用的热点.基因测序会产生大量数据,精准医疗的核心便是分析这些测序数据与临床数据之间的关系.如何将基因测序产生的大量数据进行有效的存储.分析.管理,从而制定更适合患者的诊疗方案,成为了基因测序向临床转化的关

跟益达学Solr5之使用IK分词器

   在Solr中该如何使用IK分词器呢,这是小伙伴们问的频率比较高的一个问题,今晚特此更新此篇博客.其实之前我在其他博客里已经使用了IK分词器,只是我没做详细说明.        在schema.xml配置中其实有很多关于分词器的配置示例,我从中摘录一段配置示例,比如: Xml代码   <fieldType name="text_general" class="solr.TextField" positionIncrementGap="100&qu

跟益达学Solr5之在Eclipse下编译Solr5源码

    2015年6月7日,Solr已经更新到5.2.0,所以这里我以5.2.0版本为例,你使用Solr5.x都是类似的区别不大.开始之前,首先你需要去Solr官网去下载Solr5源码,如图:          taz包其实是可以使用Winrar解压的,解压后如图:  我是解压到F:\javazipfile目录下,官方默认提供的源码包并不是一个标准的Eclipse Java Project,需要使用ivy进行构建,通过ivy的构建可以将下载下来的源码包转换成一个标准的Java Project,然