Mac Install git

Source: Internet
Author: User
Tags git clone

First, installation

Before installing, git, like SVN, needs to create a server that can create its own version Management Server. For individuals and small teams, it might be more appropriate to use a managed server. Common to have GitHub and bitbucket. GitHub has no personal free storage, and the code is open source. BitBucket's personal warehouse related pages have been basically Chinese. The registration process is also relatively straightforward. The best git free GUI tool on Mac is Sourcetree (no one). In addition, the best git code open source site is GitHub, the best git Code private library is bitbucket.   Installation process: 1, download git installer, address; http://git-scm.com/downloads2, open after download, double-click. PKG installation 3, open terminal, use Git--version or which git command to view the installation version, there is a successful installation 4, create a global user name, global mailbox git config--global user.name "Shengyao" git config--global user.email "[Email  protected] "5, after successful installation open the Terminal CD ~ Enter the root directory input command Ssh-keygen generate Ssh-key, if prompted, always press Enter   6, add SSH key to GitHub. Log on to the GitHub page, account settings->ssh public keys->add Another key to copy the generated key (id_rsa.pub file) contents to the input box, save. Commd+shift+g Enter/users/chen/.ssh/, you can see the private key and public key to see the public key and replicate: CD to. SSH directory, then more id_rsa.pub the name of the private key is Id_rsa, is the only credential that the server determines your identity. The name of the public key is id_rsa.pub. Send this file to the warehouse administrator, who will place the public key on the server and git will interact with the server through the private key above. If using GitHub is to add the public key content up to 7, to find a directory to execute git clone http://xxx.git (from the server-side clone git library, of course, the server administrator to give you permissions and account), after the xxx directory is a git directory, you can perform git operation in this directory.   Second,  linux Basic commandsudo-s    get absolute User Rights CD xxx     enter XXX directory ls (-a/-a)     Show all files under current path (hidden ) pwd        display the current absolute path mkdir  xxx    create folder Xxxman XXX       View the XXX command manual   then describe the meaning of the git basic command;clone    cloning a remote repository init         Initialize the warehouse remote  connect to the remote repository pull       get new data from the remote repository pull      upload new or modified files from the local repository to the remote repository add      add files or modify files, commit and use log before push        log information submitted by the current warehouse status   current warehouse version status commit  submit to the current Warehouse branch  branch command , related additions and deletions checkout  use the last version of the remote repository to completely overwrite the current warehouse content/Select Branch branchdiff       compare version content merge     Merge version Content

Mac installs Git

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.