git use notes

Source: Internet
Author: User

Turn this directory into a git managed repository via the git init command

The first step is to git add  Use the command to tell git to add the file to the repository:

In the second step, tell git with the command to git commit -m “ 记录信息”  submit the file to the repository:

The following information is prompted:
Please tell me who is you.

Run

git config--global user.email "[Email protected]"
git config--global user.name "Your name"

To set your account ' s default identity.

Omit--global to set the identity of the This repository.

Fatal:unable to Auto-detect email address (got ' [email protected] (none)

This is prompting you to configure the user name and mailbox. Copy the code that was prompted above
git config--global user.email "[Email protected]"
git config--global user.name "Itaotao"
And then go to commit to succeed.

git pull to update your local branch

To clone a warehouse, you must first know the address of the warehouse and then use the git clone  command clone.

GIT supports a variety of protocols, including https , but with the fastest ssh supported native git protocols.

Create a dev branch and switch to the dev branch

git checkout-b Dev

Delete Branch

git branch-d Dev

To view branches:git branch

To create a branch:git branch <name>

To switch branches:git checkout <name>

Create + switch Branches:git checkout -b <name>

Merge a branch to the current branch:git merge <name>

To delete a branch:git branch -d <name>

git use notes

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.