How to publish your own project on github

1. Install git

2. git config --global user.name "username" (the username here is the global name or nickname of git you want to set)
git config --global user.email "email address" (the set global email address)
3. Create a local repository (there are two ways to create it)
3.1 How to create a repository using the Git-gui graphical interface:

You can also enter an existing repository.
3.2 Create a new folder in a suitable local location, such as in the D drive, create a new folder repo.
Right-click to select git bash here and use git

init to initialize a git repository . Connect to the remote warehouse git remote add origin  https://git.oschina.net/username/cccc.git  (the address of your remote warehouse)  6. Upload the code to the code cloud and copy the files you want to upload to the repo folder ; Using git push -u origin master to upload files to the code cloud ps: Before push, it is best to pull once; after init, remember to perform an add and commit operation;













If such an error is reported, please use git push -u origin master -f to force the push;

refresh the code cloud project page, if only the README.md file is passed, please do the following:
a. git add . (Add all projects in the directory , there is a space between add and .)
b. git commit -m "add comment information" (add comment information)
c. git push -u origin master (go to push the file to be uploaded)

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325122870&siteId=291194637
Recommended