Linux Git command

Source: Internet
Author: User

Linux Git command git config -- global user. name "example" git config -- global user. email "example@example.com" git config -- global core. editor emacsgit config -- global color. status autogit config -- global color. diff autogit config -- global color. branch autogit config -- global credential. helper cachegit config -- global credential. helper 'cache -- timeout = 3600 'git config -- global -- list add alias gs = 'git status' in. bashrc Two ways to get a repositoryClone someone else's-git cloneMake your own-git init git add *. c (add all C source files in the current folder) git add \*. c (add all C source files in the current folder and all subfolders) git add. (add everything, be careful) git commit-agit commit-m <comment> git commit -- amend git rm <file> ---- removes <file> from Git and deletes it as wellgit rm -- cached <file> leaves it hanging in the directory, it's just gone from git mv <src> <dst> git loggit log <path> git diffgit diff -- cached edit. submit --- the files you don't want to save git branch --- inspect the branchesgit checkout branch_a --- switch to branch agit checkout-B branch_ B --- create branch B and switch to bgit merge branch_agit mergetool ---

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.