"Git Use Notes" Part II: Basic Commands and Single branch development

Source: Internet
Author: User
Tags using git

Git basic commands

    • git Add.
    • git commit-am "please fill in your NB notes"
    • git fetch--all
    • git push Origin Master:master
    • git remote Add Origin warehouse address
    • git Remote RM Origin
    • git remote-v
    • git rebase origin/master
    • git rebase--continue
    • git rebase--skip
    • git rebase--abort

# # #举例仓库

    • Warehouse Address A:[email Protected]:vincentguo/demos.git
    • Warehouse Address B:[email Protected]:infra/demos.git
    • Developer Warehouse C:[email Protected]:lurenjia/demos.git

# # #单分支开发

  • git clone A
    • Clone remote Warehouse A to the local repository, where you can see a remote repository with an Origin alias using Git remote-v
  • git Add.
    • Add an action to add a file to the cache before committing the execution
  • Git commit-am "code to submit NB Memo information"
    • Submit changes to the head area
  • git fetch--all or GIT fetch origin
    • Updating remote code locally, but not merging to local code, requires the git rebase command
  • Git rebase origin/master
    • Rebase the local current code and the master branch of the remote code, where origin is the local alias of the remote repository
  • Git push Origin Master:master
    • Push the changes to the remote repository, as described in the following command, which means: Push the local master to the master branch of warehouse a
    • Origin refers to the local alias of remote repository A that is seen in Git remote-v
    • The first master represents the local branch name
    • The second master represents the name of a remote branch



    Original address: "Git use Notes" Part II: Basic Commands and Single branch development

    "Git Use Notes" Part II: Basic Commands and Single branch development

    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.