Tortoise Git basic commands and tools used to simplify operation Git

Git common commands

1)git clone

Use git clone a copy to a local Git repository, so that they can view the item, or be modified. '

Use: git clone [url]

2)git pull

Acquire and integrate branch from another repository or a local (integrated). Git pull command role is: to retrieve a branch of updating the remote host, and then merged with the specified local branch, its complete format a little bit complicated.

Use:  git pull <remote host name> <remote branch name>: <local branch name>

3)git commit

Use git add commands to the snapshot of the content you want to write buffer, and execute git commit will add content to the buffer warehouse. Git you have to submit a record of every your name and e-mail address, so the first step you need to configure a user name and e-mail address.

Use:  Git config --global the user.name 'yourname' Git config --global user.email youremail

Git Some other commands

1)git init

Create a new directory in the Git repository with git init. You can do this in any directory at any time, completely localized.

Use:  git the init

2)git add

git add command to add the file to cache

Use:   Git the Add <filename>

3)git status

git status to see if you have modified since the last commit.

Use: git status git status -s  

4)git diff

Details of the results of the implementation of git diff git status to see the execution. git diff command displays the write cache and write cache but has not yet distinguish changes has been modified. git diff There are two main scenarios.

has not been cached changes: git diff

view cached changes: git diff --cached

View cached and non-cached all changes: git diff HEAD

show summaries rather than the entire diff: git diff --stat

5)git reset HEAD

git reset HEAD command to remove the cached content.

Use: git reset HEAD - <filename>

6)git push

The local branch of the update, pushed to the remote host. Its format git pullcommand similar.

Use: git push <remote host name> <local branch name>: <remote branch name>

7) Label  git tag

If you reach an important stage, and hope to always remember that special submit a snapshot, you can use git tagto give it to tag.

  For example, we want to release our mall project a "1.0.0" version. We can use git tag -a v1.0.0a command to commit marked the latest (HEAD) "v1.0.0" label. -aOption is meant to "create a label annotated" is. -A option can not be executed, but it does not record this label is Shashi Hou to play, who to play, will not let you annotate a label. I recommend creating labels have been annotated.

Use: git tag -a v1.0.0

If we want to see all the tags can use the following command: git tag

Git simplified operation TortoiseGit

Download: https://tortoisegit.org/download/

 

installation steps

 

 

Chinese Language Pack Installation

Right-click in the blank, select -> TortoiseGit -> Settings, then you can see the configuration interface

Select General, select Chinese Language in the right. Uncheck the automatic update checkbox, you may also need to specify the path to the file Git.exe

Click the right mouse button again, you can see the pop-up menu has become a Chinese original Settings become set;. Clone become clones

 

Guess you like

Origin www.cnblogs.com/fkg4816/p/11221787.html