Git version control usage and git conflict resolution

Source: Internet
Author: User
Tags commit svn git clone
Version control based on Git


git and svn differences:


SVN must be versioned based on a remote repository, and version control information is in the SVN server


Git: is a distributed tool, in addition to a remote warehouse, there is a local warehouse, you can then offline version control


The GIT installation automatically configures environment variables so that git can use git/bin/get.exe anywhere.


Git--version




git graphical tools--tortoisegit


Right-click in the folder directory


Git GUI Here


Git Bash Here


Git Clone


Git Create Repository


Tortoisegit






Git's easy to get started with


SVN: User Copy code operation is called checkout


itself a distributed version control tool that clones the entire repository (git clone)




GIT create repository; Create a directory to create a hidden. Git folder


git clone cloning central repository, creating a mock user Directory


Build 2 users User1 and User2


Create Itcast.txt file, commit commit to local repository, push push to central repository

Right-click File-->tortoisegit-->add-->commit


Commit is only a large local repository, not a remote repository


The user name and mailbox need to be set before the first commit


git-"Commit


Message:user1 modification


Blank Click Push


Master is the warehouse main line code, Orign is the remote warehouse code


Error also occurs: Require remote warehouse setup parameter Receive Denycurrentbranch


Need to execute Cmd:git config receive denycurrentbranch in the original warehouse (central) Ignore


Resolving conflict issues


Inside the User1: I like apples.
Inside the user2: I like bananas---conflict arises


Let User1 submit first, pull (see if anyone changes), then push (submit)


User2,pull, submitted to the local warehouse is no problem, but submitted to the remote warehouse is not possible (the file has a yellow triangle warning sign)


<<<<<

========== (split line)


>>>>>> contents of remote repositories


Right-click-->tortoisegit-->edit conflicts





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.