Jerry modified his last commit modification, and he was ready to change. The Git repository that pushes the data for the operation to be stored permanently. After the push operation succeeds, other developers can see Jerry's changes.
He executes the git log command to see the details of the commit.
[[email protected] project]$ git log
The above command produces the following results.
Commit d1e19d316224cddc437e3ed34ec3c931ad803958 Author:jerry Mouse <[email protected]> date:wed Sep 11 08:05:26 20 +0530 Changed return type of My_strlen to size_t
Before the push operation, he wants to review his changes, so use the git show command to see his changes.
[[email protected] project]$ git show d1e19d316224cddc437e3ed34ec3c931ad803958
The above command produces the following results.
Commit d1e19d316224cddc437e3ed34ec3c931ad803958 Author:jerry Mouse <[email protected]> date:wed Sep 11 08:05:26 20 +0530 Changed return type of My_strlen to size_t diff–git a/string.c b/string.c new file Mode 100644 index 0000000..7d A2992-/dev/null + + + b/string.c @@ -0,0 +1,24 @@ -0,0 #include <stdio.h> + +size_t My_strlen (char *s) +{+ char *p = s; + + while (*p) + ++p; + RETURN (p-s); +} + +int main (void) +{+ int i; + char *s[] = {+ "Git tutorials", + "tutorials point" +}; + + + for (i = 0; i < 2; + +i) printf ("string lenght of%s =%lu/n", S[i], My_strlen (S[i])); + + return 0; +}
Jerry was glad for his change, and he was ready to push his change.
[[email protected] project]$ git push origin master
The above command produces the following results.
Counting Objects:4, done. Compressing objects:100% (3/3), done. Writing objects:100% (3/3), 517 bytes, done. Total 3 (delta 0), reused 0 (Delta 0) to [email protected]:p roject.git 19ae206. D1E19D3 master−> Master
Jerry's changes were successfully pushed to the repository, and now other developers can view his changes for cloning or updating operations.
PS: If you want to communicate with the industry technology Daniel, please add QQ Group (521249302) or pay attention to the public number (askharries), thank you!
Git Push Action