Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to upload local code to github

2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)05/31 Report--

This article will explain in detail how to upload local code to github, the quality of the article content is high, so Xiaobian shares it with you as a reference, I hope you have a certain understanding of relevant knowledge after reading this article.

First of all you need a github account, if you don't already have it, register first!

https://github.com/

We need to install git tools first to use git. Here is the download address. After downloading, you can install them directly:

https://git-for-windows.github.io/

1. Go to Github homepage and click New repository to create a new project.

2. Fill in the corresponding information and click create

Repository name: Repository name

Description(optional): Warehouse Description Introduction

Public, Private : Repository permissions (public sharing, private or specified collaborators)

Initialize this repository with a README: Add a README.md

gitignore: repository type that does not require version management, corresponding to the generated file.gitignore

license: certificate type, corresponding to the generated file LICENSE

4. Click Clone or dowload and an address will appear. Copy this address for backup.

5. Next to the local operation, first right click on your project, if you successfully installed git before, right click will appear two new options, respectively Git Gui Here,Git Bash Here, here we select Git Bash Here, enter the following interface, Test_Bluetooth is my project name.

6. Next enter the following code (key step), clone the repository above github to local

git clone https://github.com/CKTim/BlueTooth.git (https://github.com/CKTim/BlueTooth.git replaced with the address you copied before)

7. After this step, there will be an extra folder under your local project folder. The folder name is the project name above your github. As shown in the figure, I have an extra Test folder. We copy all the files under the local project folder (except the new extra folder) to the new extra folder.

8. Then continue typing cd Test to enter the Test folder

9. Then type the following code to complete the rest of the operation:

git add . (Note: Don't forget the following. This operation is to add all the files under the Test folder)

git commit -m "submit information"(Note: "submit information" is replaced by "you need," such as "first commit")

git push -u origin master (Note: The purpose of this operation is to push the local repository to github. This step requires you to enter your account and password)

About how to upload local code to github to share here, I hope the above content can be of some help to everyone, you can learn more knowledge. If you think the article is good, you can share it so that more people can see it.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report