A Super Easy Tutorial on Git Visualization — How to Use Git GUI
Category Programming Techniques
Preface
I've always wanted to write something like this because when I first came into contact with it, I also carefully read Liao Xuefeng's tutorial, but it seemed to me that it was a bit too much, and it still brought me a lot of redundant and repetitive operational burdens. So I hope to reduce its cost in my work, but I didn't find a satisfactory tutorial after searching, and in the new year, I sorted out my own experience.
Perhaps there are many male gods who think Git is so simple that they already feel that command line operations are SO EASY, and they may even look down on the psychology of visual facing low-end users. Well, then you can consider me as a water goods and go to the upper right corner.
I always feel that something like GIT is just a not completely necessary tool for me. I don't want to be an expert in using it. For similar things, there is GIT today, and there may be GAT tomorrow, or GAY? So quickly master the important daily operations I need, preferably in 10 minutes, that would be great. If you have a similar idea, well, then don't talk nonsense, let's start quickly.
(The whole text is limited to the Windows system.)
What is GIT?
Install GIT, and roughly understand what GIT does .
Permission Verification
Firstly, your data is saved on a remote server, and the server needs to identify your identity. A segment of RSA encryption string.
Start the GUI, menu-help, Step1- Create SSH KEY Generate SSH KEY
Step2- Add the key to your code hosting server, in your account settings, add it.
For example, in Github, the address is arbitrary, such as you can use Home, company, etc. as an identifier to distinguish.
Demonstration in Gitlab
Account Saving
If you don't set it up, every time you submit, you will be asked to fill in the password. So let's set this up first.
Step3.1-Add Environment Variables
My Computer - Properties - Advanced System Settings - Environment Variables - New Variable
Variable Name HOME, Variable Value %USERPROFILE%
Step3.2-Create Account File
If you have used SVN, you will have a general understanding of the operation process, and if not, it doesn't matter.
Initialization (Git init)
As the name suggests, it is to create a new project, just like creating a new canvas with PS. You can create it by right-clicking in the newly created folder, and if you click Git bash, this directory will be entered as the current directory in the command line state.
Add (Git add)
Adding is not submitting code to the remote Git repository, and Git will not automatically save every process you modify when you change the code. You may have modified many files, but not all modifications are intended to be submitted in the end. So which ones do you intend to submit? You can add them to the cache for later submission, which is called caching changes. It's very simple, for example, I have the complete project on my local computer, even