The first time you've encountered a problem submitting your code with GitHub desktop (MAC)

Source: Internet
Author: User
Tags git clone git shell

1. Create a new Code warehouse

2. Generate key

Ssh-keygen-c ' [email protected]ail.address '-t RSA

3. Locate the Id_rsa.pub file under the. ssh folder in the root directory, and copy the contents to the target location.

4. Enter ssh-t [email protected] under git shell to test if the public key you just uploaded is correct

When it is correct, it displays:

Hi "Your Name"! You've successfully authenticated, but GitHub does not provide shell access.

5. Assign the address of the code warehouse you just created, clone the contents of the repository to a local

git clone https://github.com/YangXudongJack/JYMenuview.git

6. Then clone the code locally, then locate the repository file and copy the code file you want to submit.

7. Cut into the Git shell and enter the command

Git init

Git commit-m ' Jymenuview '

Git remote add Origin https://github.com/YangXudongJack/JYMenuview.git

Git push Origin Master

(1) If you execute git commit-m ' jymenuview ' error message

On Branch Master

Your branch is up-to-date with ' origin/master '.

untracked files:

jymenuview.xcodeproj/

jymenuview/

jymenuviewtests/

jymenuviewuitests/

Nothing added to commits but untracked files present

Then execute git add jymenuview.xcodeproj/and add the prompt files to the repository's management directory.

(2) If you execute GIT remote add origin

Https://github.com/Flowerowl/stumansys.git

, an error occurred:

Fatal:remote origin already exists

The following statement is executed:

Git remote RM origin

Then execute git remote add origin https://github.com/Flowerowl/stumansys.git .

(3) When executing GIT push Origin master, error:

error:failed to-push som refs to ....

The following statement is executed:

Git pull Origin Master

First pull down the file on github above the remote server and push it up.

The first time you've encountered a problem submitting your code with GitHub desktop (MAC)

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.