git view remote address

Many people use git rarely at the command line, and generally use visualization tools like smartgit. How to check the remote address of the current project:

$ git remote -v

This command can display the remote clone address of the corresponding project.

 

 

/step

 
  1. 1

    Go to the mysgit official website to download the software. For Windows, click download directly at the top of the page to download.

     
  2. 2

    Change setting

    git config --global user.name

    git config --global user.email

    Such as:

    git config --global user.name "zbx"                

    git config --global user.email "[email protected]"

     
  3. 3

    Enter the directory where you want to put the project. In this example, the gitdata directory is the directory where I put the project.

    Clone a remote project git clone

    Such as: git clone http://XXX.XXX/sq-group/XXX.git

    After the clone is completed, you can see the project name, and after entering the project, you can see some git related files

     
     
  4. 4

    View remote branches

    git branch -r

     
  5. 5

    Create a local corresponding branch

    git checkout --track or git checkout -b

    Such as:

    git checkout --track  origin/dev-zhengqigit ,

    git  checkout -b dev-zhengqi  origin/dev-zhengqi

     
  6. 6

    After the branch is established, it will enter the new branch by default. If you want to enter other branches, you can pass

    git checkout plus branch name switch

    Such as:

    git checkout zhengqi

     
    END

 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326486177&siteId=291194637