Tag: git
When submitting code on the GIT server, we may have some information to be modified when writing the code modification content. In this case, it is very troublesome to cancel the original operation and resubmit it,
So today I will share with you the solutions to my problems. Of course, it also allows you to look at it when you forget it in the future.
1, git commit -- mend
This command is mainly used when you need to modify some code comments after submitting the code.
2, git branch-
View All branch names.
3. Git status
View All modified files in the current directory and Its subdirectories.
4. Git diff
View the contents of the modified files in the current directory and Its subdirectories.
5. Git log + file.
View the previous modification content of the file and Its submitter.
6. An important warning command. Must be used with caution,
Git reset head ^
This command is mainly used to cancel the current commit operation, but this command also has a side effect, that is, when you submit for the second time, there will be some error information to be processed. However, I
It is not clear how to handle the problem.
7. Note that after each code submission, the local branch can be changed, but the local branch name must be consistent with the local name submitted to the remote branch when the code is submitted.
Git server code submission Summary (2)