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
-
Go to the mysgit official website to download the software. For Windows, click download directly at the top of the page to download.
-
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]"
-
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
-
View remote branches
git branch -r
-
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
-
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