git user manual

Source: Internet
Author: User

Use the git XX--help command to view the relevant command Help documentation

Cloning a project

//Clone Master Master Branch
git clone http://192.168.1.223/project name. Git
//Clone Develop Branch
git clone http://192.168.1.223/Project Name. Git-b Shop
//Remember user name
git clone http://[Email protected]/Project Name. Git-b Shop
User Management –origin

//View Origin User information
git remote show origin
//Add User
Git remote Add origin add http://192.168.1.223/Project Name. Git
If it is a Git clone project, the default origin user does not have to configure
Initialize configuration

git config--GlobalUser.Name [Username]
git config--Globaluser.email [email]
git config--GlobalPush.defaultSimple
//View configuration Files
git config--list
git config--list--Global
Branch Management

//List all branches
Git branch
//Create a branch and jump to a branch
git checkout-b Develop
//Switch Branches
git checkout Develop
//merging branches and deleting branches
git checkout Developgit
git merge--no-ff tag1git
Git branch-d tag1
Git basic Snapshot management

//update current snapshot to latest
Git pull
//view current git status
git status
//Add a modified file
git add READ. MD test.php
git add *.php
git Add.
//Submit Current Changes
Git commit-m"First commit"
//commits the current modification to the remote
Git push Origin Shop:shop
git push//Simple mode must be configured with push to easy mode
git commit recovery

//view commit records for all branches
git log--oneline [--graph]
//view only records for develop branches
git log--onelone Develop ^master
//revert to the last commit
git reset head^
//revert to the specified commit
git reset--hard 057d
Git Tag Management

//tag is only added to all develop versions
Git tag-a v0.9

git user manual

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.