Joke Collection Website - Public benefit messages - How to upload local code to the code cloud through git

How to upload local code to the code cloud through git

Create a local version library

First, create a project folder, open Git Bash's right-click option in the project folder here, open Git's command line window, and enter git init to initialize the library management file, which will generate a hidden directory. Project folder under git.

Paste _ image.png

Paste _ image.png

2. Create a file in this directory and submit it to. Git directory through the following two instructions.

git add? File name? # This sentence is to add git commit -m "submitted explanatory text" to a submission list? # This sentence is really submitted to the local warehouse.

Just how to create a Git warehouse locally. Now, combined with the code cloud, let's create a remote warehouse project.

Learn to use the code cloud remote library

First, you need to register a code cloud user, and then start to create projects on the code cloud platform, as shown below.

Paste _ image.png

2. Modify the global configuration of Git. After this modification, there is no need to modify it.

Git configuration-global username? Your user name in the code cloud is the ownership name created by the project "gitconfig-globaluser". Mail? "The email account you used to sign up for CodeCloud"

No message prompt is the best message, indicating that you have configured the global variable OK.

3. Clone the project above the code cloud to local use.

The mit -m "First Use of Code Cloud" of git Cloning Project git push -u Remote Library Name master? # Add -u the first time you use push, but don't add it later.

After that, you will find that all your code has been uploaded to the code cloud. Is it simple?