• 10 minutes to teach you how to configure multiple git SSH connections locally


    preface Have you changed your computer recently? Remember how to configure multiple git SSH connections locally? Generally, companies use their own intranet deployed gitlab server for code management. Developers use the company’s user name and company’s mailbox. In personal open source projects, our code is hosted in GitHub. At this time, we need two or […]

  • How does git discard all local modifications


    This article mainly introduces how git abandons all local modifications and shares them with you. The details are as follows: Git checkout. # all local modifications, which are not submitted, return to the original state Git stash saves all uncommitted changes to stash. It can be recovered with git stash pop. Git reset — hard […]

  • Explain the usage of stash changes and unstash changes of git in idea


    1. First pull the code from GIT.We did some code editing locally. The new method is shown in the red box2. Use git‘s stash changes function, as shown in the figure below 3. Check the changes in the local code, and you can see that your new method is gone, and you are back to […]

  • Introduction to git pull and push commands


    Bloggers are learning git command recently, because Git is a very easy-to-use distributed version management tool, which is more powerful than SVN. Unlike SVN, Git is decentralized. Each branch is a center and supports local warehouse storage. For example, many large companies use git for version control. The specific orders are as follows: Git pull […]

  • How to use git’s elegant rollback implementation


    In the development process, we often encounter code rollback. As normal people know, GIT rollback has two major advantages: git revert git reset When we develop locally, we haven’tgit pushWhen it comes to the far end, it can be used without scruplegit resetRoll back. More often than not, we not only push, but also because […]

  • Git installation tutorial under Windows


    GitHub is a project repository, which is very convenient to use. The following describes the software installation for managing GitHub warehouse and git installation under windows. Git is the most popular version control software. It contains many advanced tools. Here’s how to install GIT. Download address of official website: https://git-scm.com/downloads Download address in China: https://github.com/waylau/git-for-win […]

  • Configuration of SSH key in Git


    Git clone supports two ways to download source code: HTTPS and git (SSH) When using git mode to download, if SSH key has not been configured, the following error prompts will appear: Here’s how to configure the SSH key of GIT so that we can download the source code in Git mode. First, check whether […]

  • Git pull remote branch to local method steps


    Steps: 1. Create an empty file named hhhh 2. Initialization git init 3. You want to establish a connection with origin master (the underline is the link of remote warehouse) git remote add origin [email protected]:XXXX/nothing2.git The remote warehouse link is in GitHub, as shown in the red box below: Input command: 4. Pull remote branch […]

  • Implementation of GIT modifying committed annotation information


    Sometimes it is found that the comments are not suitable after commit and need to be modified. Some methods are found on the Internet and sorted out after testing. Environment: Windows Situation: no push after commit Before modification: Modification steps 1. Enter the command and enter the VIM interface git commit –amend 2. Enter edit […]

  • The difference between git fetch and git pull


    Git fetch and git pull can update the remote repository to local. What’s the difference between them? There are several concepts that have to be mentioned to clarify this issue. FETCH_HEAD:Is a version link, recorded in a local file, pointing to the end version of the branch that has been removed from the remote repository. […]

  • Git set user name password example code


    Git set user name and password Set git user name / email address git config –global user.name [username] git config –global user.email [email] But this is only to set the user name and password. If your git source needs you to input the user name / password for verification every time, you still need to […]

  • Two methods of GIT branching and merging


    How to merge two branches together. That is to say, we create a new branch, develop a new function on it, and then merge it back to the main line after the development. 1.   git merge Let’s take a look at the first method——git merge Merging two branches in Git results in a special commit […]