Build a local git center repository for Linux with cainiao

Source: Internet
Author: User


Yesterday, the gpio simulated SPI control wm8768 codec was implemented, so I had to submit the code and finally learned how to use the GIT repository. I used to ask my colleagues for help, I always feel that I have to learn well. After uploading the code, I think it is actually not very difficult. In the morning, under the guidance of Ginger, I finally learned how to build a local git central repository to manage code. Now, let's share what we have learned and make sure that we can relearn it later. In the company, things are replaced without affecting learning. Haha ..

1. Create a folder to test

 

2. Write a main. c file to test.


The content is as follows:

 

3. Create a git repository.

 

4. Add and upload the content.

 

5. Check the GIT log information.

 

6. Is there something? Indicates that the file has been uploaded. Then we need to create a git repository repos.

He cloned the GIT repository.

 

7. We have already set up it. Next, let's take a look at downloading it and upload some simple operations such as code.

First, give the test repository that was created at the beginning to RM.

 

8. Then start to clone git.

Okay. Do you see the test? It indicates that git has been cloned.

 

9. Then we try to modify the code.

 

10. Then upload

 

11. Then we push the code to the repository through git push.

 

12. OK. Let's take a look at some information.

 

Let's see where the branch is.

 

 

Gitk can see all the commits and modifications. Have you seen them? The source is the test we created, and then the GIT clone test we modified. That's it.

.

Let's take a look at the GIT log information.

 

That is, the modification is made twice.

 

Well, the establishment of a simple local repository is like this. You can learn more about git operations later. Hahaha .......

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.