GIT basic operations

Source: Internet
Author: User
Environment:

Win7_x64 flagship edition, Git-v2.5.1.windows.1, Git-gui-v0.2.0.gitgui

First, the new warehouse 1. Click "Create New Repository"

2. Enter the warehouse path (C:\text,text directory must not exist, click "Create" button, Git will create a directory)

Second, after the modification of the document "submit" 1. Refresh

2. Add modified files (including additions, deletions, changes)

3. Submit and add a log

Third, the Clone warehouse 1. Select the "Clone Existing Repository" button

2. Select the path and clone of the source warehouse, destination warehouse

Four, push to remote host 1. Add a remote host

2. Set the remote host name and address

3. Updating from a remote host

4. Merging the content updated from the remote host

5. Push to a remote host

6. Select the branch of the remote host (typically the main branch)

If the following error occurs:

"Remote:error:refusing to update checked out Branch:refs/heads/master"

Workaround:

To the remote host, open the Git Gui, open the repository, and execute the "git config receive.denycurrentbranch ignore" command

7. View on a remote host (the command must be executed first (reset branch) to see what other hosts push)

GIT basic operations

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.