Git common commands Click to view

Source: Internet
Author: User
Tags using git

Create a git project warehouse $git Init configures the personal registration information so that when team collaboration, you can see which user modified which Files $git config--global user.name ' cfanbo ' $git config--global user . email "[Email protected]" If there are temporary files, it is not necessary to submit to the branch, you can write the file name or path information in a. gitignore file $echo ' tmp/' >>. Gitignore $echo '. Zfxml ' >>. Gitignore add file to Main branch master and submit $git Add. $git commit-m ' first initialization operation Yo ' if only a few files later, you can add files separately and submit them, such as $git add a.txt b.txt $git commit-m ' Add File txt '

==================================

New branch from master local $git branch Local you can use the command to see if it is successful, where the previous * symbol represents the current branch $git Branch switch Branch to local $git checkout local using GIT branch view If there is a * in front of the local, there is a successful switchover $git branch after the different branches are edited, this time needs to be merged into the Master branch master, this operation needs to be in the master branch $git checkout master $git Merge Local if there is a merge problem, you need to edit it manually, and then do $git add file_name $git commit-m ' xxx ' to delete the merged and useless branch local $git branch-d Local if you need to delete the unincorporated branch , you need to use the-D option, but test it and find that the-D option above also removes the $git of the unincorporated branch branch-d test

Git common commands Click to view

Related Article

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: [email protected] 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.