Git Push Action

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.