How to Use git in linux

Source: Internet
Author: User
Tags how to use git using git

In linux, git is a version control tool in linux. I don't have large projects or servers, so basically the most useful push and so on won't be used. My program is developed by myself. Now I want to mark my version and switch between versions. One person suggested using git-tag, the following describes how to use git: Body 1: Create a database # create an empty database and create it in the current directory. git init 2: add www.2cto.com # add all files in a file or directory to the version library git add. cpp git add. /src/3: Submit # submit the current Code (to local) # [-a] submit all the code added by git in the current code library (?) # [-M "message"] with the information you submit, you will be notified of this git commit-a-m "message" 4 when switching tags in the future: tag (you must first run "Submit") # Add a tag # [-a tag-name] Add the tag name (for example,-a V1.0) # [-m "message"] Add tag Information, which is displayed in tag show, instead of displaying www.2cto.com git tag-a tag-name-m "message" # deleting a tag # [-d tag-name] deleting the tag name (such- d V1.0) git tag-d tag-name # switch to a tag # It seems that branch and tag both use the same switch git checkout tag-name

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.