Coding Beginner's Tutorial (i)--manage Coding projects with GitHub GUI client

Source: Internet
Author: User
Tags version control system

      • I. Overview
      • Second, the basic concept of Git
        • 1. Four Concepts about storage
        • 2. Branch (branch)
      • Third, the project management practical operation
        • 1. Install GHFW (GitHub for Windows)
        • 2. Create a new project on coding (new remote warehouse)
        • 3. Create a local warehouse
        • 4, the basic use of GHFW

configuration: Win7 + GitHub for Windows
target Audience: no git, no GitHub, want to use coding and don't want to use command line classmates.

Preface: The purpose of this article is to basics, only to talk about some necessary steps and concepts.

I. Overview

Coding.net is a recent code-hosting platform. Similar to the general known GitHub. The advantages of coding are: first, Chinese interface; second, free hosting of private projects. The downside is that the security of the project has not yet been verified. In short, pros and cons.

This article mainly describes how to manage projects on coding with GHFW (GitHub for Windows) .

Second, the basic concept of Git

Before introducing GHFW to coding project management, let's introduce the basic concepts of git. Git is a version control system. In short, it is used to manage code.

1. Four Concepts about storage
    • working directory (working directory): The working directory is the folder item , which holds the actual file.
    • Staging Area (the staging area): Staging area is like an index that links project files together.
    • local repository: A place where version control is actually provided.
    • remote respository: A warehouse placed on a network.

The process of incorporating a project into version control is probably the 工作目录->暂存区->本地仓库 process of submitting it upwards. When a new file is added to the project, a file is added to the working directory. At this point staging area does not know that there is a new file, so the addition of new files to tell staging area, so that the new file is tracked (be tracked), and the file is added to the staging area. If you modify a file that has already been traced, you still need to add a change to the (add) staging area after the modification. New files or changes that have been added to staging area can be submitted (commit) to the local repository and incorporated into the version control system.

Remote repositories are useful when developing a project with multiple devices, or if more than one person develops a project together. The remote repository is nothing more than a clone of the local repository. When a new commit is generated by the local repository, it can be kept in sync as long as a merge with the remote repository is made.

2. Branch (branch)

Each time a change is committed to the local repository, the local repository does not save the modified portion of the file, but instead saves a snapshot.

How Git manages submissions

Each column in the above image represents a single commit, and each cyan node represents a snapshot of the file. Assuming that the local repository is currently in Version1, it is committed to the local repository after changes have been made to files A and C. Then the local warehouse will save a and C snapshots of A1, C1, and a list of links to snapshot A1, C1 and the original snapshot Node B, as a new commit Version2.

The concept of branching is based on the idea that a branch is a pointer to a commit. Because each commit is connected by a linked list. So a branch is a history of looking back from a committed object.

Before committing on the develop branch

The master and develop in is two branches. Each commit operation is based on a branch, and Git saves a pointer called head in order to know which branch it is currently working on. You can think of the head as the alias of the current branch. (The asterisk (*) in front of the develop is used to differentiate between the current branch and other branches.) )

After committing on the develop branch

When a new commit is generated, head points to the new commit, that is, the current branch points to the new commit. For example, a new commit Version3 was made on the develop branch.

Three, the project management actual combat Operation 1, install GHFW (GitHub for Windows)

Download Link: https://windows.github.com/

The installation process is completed with one click.

2. Create a new project on coding (new remote warehouse)
New project page
    • Readme: A Readme file is added to the general project to give an overview of the project so that you can see at a glance what the project is for and how to use it. The Readme file is written in markdown syntax.
    • Open Source License: defines how the project is propagated, such as whether others can use the project commercially, and whether others can freely disseminate, publish, or change the project.
    • . gitignore file: This file can define which files are not added to the warehouse, such as temporary files generated by the project.
3. Create a local warehouse

Open the GitHub client and the client will ask to enter GitHub's account and password when it is opened, if not directly skip the GitHub account.
In the top left corner of the coding new project page, you will see the following link:

The link address of the remote warehouse

Click on the link and drop it directly into the GitHub client window. Set the path to the local repository in the pop-up window. As a result, the remote repository is cloned to the local repository.

4, the basic use of GHFW
GHFW Interface Description

After adding and editing files in the working directory, check the GHFW window for any changes that need to be submitted. This submission is then described and submitted. Finally, the changes are synchronized to the remote repository.

Coding Beginner's Tutorial (i)--manage Coding projects with GitHub GUI client

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.