Git+github Personal Use Experience Summary (continuous update)

Source: Internet
Author: User
Tags svn using git version control system git clone

Easy to be a beginner git, the following are personal summary, I hope you can feel free, a lot of points I understand the deviation, thank you.

Git Getting Started book: http://progit.org/book/

Version control systems, previously known as CVS and SVN, have recently seemed to be a big substitute for git. After a preliminary understanding, there are many essential differences between git and the previous version control system.

The development process of version control system: Stand-alone version control system (offline)--integrated version control system (online)--distributed version control system (Offline/online)

Integrated version control system: CVS, SVN are all of these. Suitable for multi-person collaborative development, the project warehouse is placed on a remote server, the server holds all historical versions, and everyone's local work warehouse is only one version of the project on the remote server. This also means that most operations have to be done in a networked state, including committing, updating, rolling back, and so on. And in this way, once the data on the remote server is destroyed, the damage will be unrecoverable. Distributed version control system: Git. Git also has the concept of a local warehouse and a remote server warehouse. But the local warehouse in git does not differ from the content on the remote server, and all versions of the history are saved. This means that most operations are offline and can be recovered from local data even if the data on the remote server is corrupted. Important concepts in Git: Working directory (working directory): Modify the file in the working directory, the modified file status is modified, the newly added file is untracked, and the file is saved to the staging area through the git add command; Staging Area: Save the snapshot that will be submitted to the file in Git repository next time. The file status is staged, and the git commit command submits the file to Git repository; git repository: local repository. Update the remote server repository through git push command, and update the local warehouse with the git pull command. Start using git: Install git,http://progit.org/book/on this machine use GitHub to act as a remote server, hosting local code: www.github.com registers a good account on GitHub, creates a warehouse, You can host the local warehouse. The rest is to learn from the principle of git, master git familiar commands, do not understand the git--help. Git common commands: git config: Configure git git add: Update files in working directory to staging area. git Add. Update all Files git commit: Submit files in staging area to Git repository. git commit-m ' message git status: View state git diff: view changes git remote: View remote server alias, plus-v Display URL information git remote add Server_url local-a Lias: Adding a remote server git clOne project_url local_alias: Copy items to this computer git push server_url/local-alias: Update remote server repository git pull server_url/ Local-alias: Updating the local server repository

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.