github learning Introduction

2011-04-22  来源:本站原创  分类:Development  人气:156 

git learning records

1. Git it works: Object Model

git all of the above historical information through a 40-bit file name of the object indexing. The object name used SHA1 algorithm, in fact, the file message digest.

Three benefits:

Object Details:

Content, size, type

Introduced four types:

blob object: that is a binary data storage, and file names, directories, etc. nothing to do. If two files have the same version of the same content repository, it will share the same blob object. You can git show ....... command.

tree object: in fact, a list list of entries, each entry can point to the blob object can point to the tree object.

commit to: a commit object pointing to a tree, and record the time to submit some information. SHA1 encoding objects, including tree, parent ---- usually the current branch, document those changes, the creator of this submission, comment information

tag object:

A simple example:

Differences in the svn git:

git will record the entire contents of each commit, svn version control tools such as the difference each commit record.

Svn directory structure and not the same, each project has a git directory. Each subdirectory has a svn svn directory.

add command is not the same:

git add track the content, so not only can add new files. After the file has been modified by git add can also be added to the index, the next commit.

git directory and working directory:

git Index:

git index recorded a change of information, including which files are temporary, and which files are temporary and so is not modified, use git status command.

2. Git basic operation

1. Git clone: ​​the remote code to copy to a local, you can choose two protocols git protocol and http protocols.

2. Git add: actually put the modified files to the index in order to commit the time to be submitted.

3. Git commit: the submission of the content inside the index and create a new branch.

4. Git status: View some of the current state of the branch

5. Git branch See all branches of the project

Create a new branch

6. Git checkout a branch switch

7. Git diff compare various versions of the differences between branches. Specific operations reference http://gitbook.liuhui998.com/3_5.html .

3. Common Problems

Merge conflict?

If the two branches have modified the same file, the merger will produce conflict. Use git diff to see changes to file the appropriate conflict of files, the implementation of git add and git commit, on it.

Distributed development mode?

git pull and git push command together

相关文章
  • github learning Introduction 2011-04-22

    git learning records 1. Git it works: Object Model git all of the above historical information through a 40-bit file name of the object indexing. The object name used SHA1 algorithm, in fact, the file message digest. Three benefits: Object Details: C

  • iBATIS3 Learning - Introduction 2010-03-29

    Recently been learning iBATIS3, although not yet released its official version, nor hinder my enthusiasm for it. And his premature aging, memory decline, with a total record of what is needed to create their own forget anything when you look back. No

  • red5 Learning - Introduction 2010-04-13

    Because the working relationship, the company has a project needs is to do video on demand mobile terminal. Background video management system is already there in use, our company is only responsible for a background check to change the basic operati

  • Free Programming Books 2013-10-25

    https://github.com/vhf/free-programming-books Index Meta-Lists Graphics user interfaces Graphics Programming Language Agnostic Algorithms & Datastructures Theoretical Computer Science Operating systems Database Networking Compiler Design Programming

  • 一些前端开发的资源 2013-11-27

    Frontend Development Guides Hack Design Designer School TheExpressiveWeb Talks To Help You Become A Better Front-End Engineer In 2013 Web Development Teaching Materials Learn HTML5, CSS3, and Responsive WebSite Design in One Go Codeacademy Good sourc

  • Oracle Learning (1) - Introduction to Oracle for 15 days 2010-04-07

    * A few days ago I shared a bit rubbish after graduation learning java and Oracle article, could be determined to enter the IT graduates or people a little help. Many current students email asking how I should be learning Oracle, while the project is

  • Introduction to install ruby and Grammar Learning About 2010-07-30

    Hope to people who just want to touch a little help ruby. I was also new to this period of time to prepare their free time learning about ruby, I was mainly used for product integration write automated web testing tool. ruby Download: http://www.ruby

  • Learning to use maven to see a very practical introduction to tutorial (rookie level entry) 2010-08-20

    I. Introduction knew maven java project in the management of reputation and so he thought of learning to master, so a large amount of documentation. Discovery of these documents are the biggest names in java, most are standing mastered maven introduc

  • Ext JS and Ext JS-Ext introduction and application of learning experience Summary 2010-12-04

    Ext JS- Preface 2.1. Feature-rich, no one can match his Whether it is the beauty of the interface or function of the strong ,ext Topped the table controls . Radio line, multi-selection, , Highlight the selected row, push pull to change the column wid

  • Learning XNA 4.0 Introduction 2011-01-11

    Chapter Introduction I was Norman University (Neumont University), Professor DirectX and XNA game development courses for several years, but I always failed to find their own books and feel of these programs lost. This subject has a mass of books, bu

  • Introduction to learning struts2 2010-07-11

    First need to download: http://struts.apache.org/2.1.8.1/index.html When learning can imitate struts2 source: open apps folder - struts2-blank-2 .1.8.1 extract, which is an empty frame. myeclipse in Add Source Show: to find the corresponding package

  • Groovy learning (order changes from the master Groovy) - Groovy introduction and installation of plug-ins 2010-08-19

    1. What is Groovy? Groovy is a JVM for an alternative language - an alternative is one that can use Groovy In Java platform Java programming, using the methods and the use of Java code Jiben the same way. In the preparation of a new application, Groo

  • Introduction to learning iReport 2010-11-01

    First learning, I feel no clue, find the old time, will start the application configuration iReport simple technology is the first step! iReport is a report design, application version is 3.7.5. 1, new --- "report -" Report name / location / fil

  • Introduction to software development personal views of learning 2011-01-05

    Realistic chance to see the Internet "by the C # fashion to mind - the advice to novice programmers," a text. One point of view: to avoid "impetuous" encouraging "practical" ways to learn, I very much agree, but I felt this a

  • Introduction to DWR learning 2009-08-05

    dwr is a ajax (Asynchronous JavaScript and Xml) to achieve the java, it provides a web browser in the client directly using js call back-end business solution components to download ( http://directwebremoting.org/ ) 1. Download dwr.jar, to work on th

  • Step-by-step learning Ruby (1): Ruby Introduction 2009-09-24

    Article Abstract Ruby is how to Ready ScreenShot Ruby is how to The inventor of Ruby Yukihiro Matsumoto Yukihiro "matz" Matsumoto , A mixture of his favorite languages (Perl, Smalltalk, Eiffel, Ada and Lisp) have had a command function and the n

  • JasperReport introduction and learning of Samples [reproduced] 2010-03-29

    To run the sample under the examples, first of all you have to install ant, and set a good environment variable. And then to the dos mode, to a certain sample directory, run ant view would be to show report 1. Alterdesign This example shows a number

  • Learning Hadoop one conclusion: HDFS Introduction 2010-01-26

    1, HDFS the basic concepts of 1.1, data block (block) HDFS (Hadoop Distributed File System) by default the most basic storage unit is 64M of data blocks. And ordinary file system is the same, HDFS file is divided into data blocks 64M a store. Is diff

  • Introduction to Learning Resources Flash Builder 2010-04-06

    Flash Builder Resources Flash Builder Getting Started in the most convenient way is to visit the Flex Developer Center's "Getting Started" section. Other recommended resources: Institute of Flex application development week (http://www.adobe.com

  • Oracle Learning (3) - Introduction to Oracle for 15 days 2010-04-07

    Oracle Getting Started (3) These common functions you do not know how many? Although I do not advocate the business logic in sql in treatment, but some simple business I Renshi or dealt with in the sql it makes me a lot of effort and Efficiency Jiesh