The company has a new programmer who has more than 3 years of work experience and does not know how to use git

A new programmer came to the company. He has more than 3 years of work experience and does not know how to use git. He said that he had been using svn before, but suddenly changed, and he was very uncomfortable. It stands to reason that with the basics of svn, he should be able to learn it quickly, but he has been here for half a month, and he still doesn't know how to use git.

Every time I submit code, I always encounter various problems. I spend a lot of time every day to deal with code conflicts. I always say that svn is easy to use, and git is too troublesome to convert. I don't know why he is so fond of svn.

Indeed, although both Git and SVN are version control tools, there are still some differences in use. Therefore, even if you have experience in using SVN, it will take some time to adapt to the use of Git.
It's just that this applies for a little longer.

git init - Initializes the repository. This command is used to initialize a new Git repository. Enter the root directory of the project on the command line, and then run the git init command to create a new Git repository.

git add . - Adds files to the staging area. This command is used to add files in the workspace to Git's temporary storage area for subsequent submission to the Git repository. .Indicates to add all files, and you can also specify a specific file name.

git commit - Add the contents of the staging area to the repository. This command is used to submit the content in the temporary storage area to the Git warehouse and create a new submission record. When executing this command, you need to add a commit message to better describe the content and purpose of this commit. For example: git commit -m "Added a new feature".

In general, these three commands are the most basic operation commands in Git, which are used to create a new Git warehouse, add changes in the workspace to the temporary storage area, and submit changes in the temporary storage area to the Git warehouse middle. Proficiency in these commands is very important for using Git to manage code.

Guess you like

Origin blog.csdn.net/X8i0Bev/article/details/129760952