Mengxin records how to use github in VS2017/2019, don't spray it.
table of Contents
table of Contents
Problem solving methods and points of attention
A complete upload to Github steps
Explore what the colors in commits mean
Problem solving methods and points of attention
- Push\upload\synchronization failed, just log in to the github account again here
- Github cloud repository Repos does not support Chinese
text
Detailed exploration process
-
Create a new solution
-
You can see that the internal files of the solution are these:
-
Open the sln file, because it is an empty project, so there is no file
-
Create a source file .cpp
-
Ready to try github remote push my code
Knocking on the blackboard: I originally wanted to do remote push, I need a local library and a remote library
The local library can have a different name from the github remote library, just the connection relationship
Obviously, the local git library of the solution is inside the solution folder, which is very convenient
-
The local library is created
-
Start trying to link github
-
First change my code
-
Enter the team explorer
Choose to change, pay attention to the point of synchronization here, because synchronization will find github repos without this solution
The change is the Chinese name of a commit, which is to take a snapshot of the current code, and then push it to the commits of github. Obviously, there is a description of this commit
-
Pay attention to the branch here
-
Knock the blackboard: Commit is to save the local git library, and push is to upload to github.
-
The prompt found that I did not log in github, so log in
-
Didn't find it, this solution has not yet established a cloud repository, that is, a github repository, let's build it now
-
github's repos does not support Chinese names
-
Outgoing submission is the commit that you submitted but has not been uploaded successfully
-
Show successful submission
-
Check it out on github
-
Obviously here are all the files,
-
The time on the right is the time of change. I changed the .cpp and uploaded the commit. Now I will upload another commit.
Try again
-
Change code
-
Necessary commit instructions
Something went wrong, something went wrong, try syncing
-
Doesn't seem to work
-
Reason: Unable to read the username of " https://github.com ": Terminal prompts are disabled
-
Go to the homepage to sync and try
-
Found it can be uploaded
Finally try
- Upload test3 commit
-
Upload test4 commit
-
Upload another commit
-
Come to github's repos library to see my commits
to sum up:
- Push\upload\sync failed, just in
-
Log in to the github account again, and the problem can usually be solved
A complete upload to Github steps
(Learn how commit to see changes)
You're done
Explore what the colors in commits mean