My team and I used git for code management in my previous college practice and Li Youmeng Teacher's class. But all use a visualization tool, Sourcetree.
In this tool, there is no need to tap the git command, it is all a visual interface. This is my first time to touch git commands and I need to learn more.
After you've installed Git on your desktop, right-click on the desktop, choose Git Bash here, and enter the following command.
At this point, the initialization process is completed and a warehouse is generated.
Then edit, compile, and run the helloworld.cpp.
Set your own user name and mailbox on the command line.
Then add the code to the staging area, and then use commit to go to the local repository.
The log command is used to query the version history.
Create a new repository under the GitHub account, HelloWorld.
Use the command line to try to get SSH key.
Import the acquired SSH key into GitHub.
Connect to the remote cloud Library and upload the local warehouse files to the server side.
Where the code is exactly the same.
Compare fetch and pull
Make changes to the code.
A total of two versions are submitted at this time!
Use the FETCH command.
Generated two branches, remote branches and local branches. The code for the remote branch is more ancient, and the local branch code has been modified!
!
The temp temporary branch merge was used successfully.
Clone command.
git command usage Tang Jiawei