Simple and useful commands about Git

Source: Internet
Author: User
Tags using git

Time is progressing, now is not the time of SVN, many people are using Git. So I also learned a little bit about the use of git.

Common steps to commit code via GIT:

Git Status: View file Status: This command displays all files that you have modified in your project.

git add–a: Add upload file: The command user adds the file you want to submit (-a) is the commit all. If you submit it separately, you only need to add a separate file path (the path can be a file or a folder).

Git commit-m "Append delete file": Submit File command, which tells git add file conditions to the local git server.

Git push origin head:refs/for/develop: Push to remote naming, which tells The local server that the modified file was pushed to the remote server.

Common ways to resolve conflicts:

Git stash: The content that was originally modified is saved, and the command saves information about the changes in the project.

Git pull: Get new content from the server

Git stash pops: Merging buffers and updated content.

Simple and useful commands about Git

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: 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.