Create a repository on GitHub

Source: Internet
Author: User
Tags commit git clone

1. Go to https://github.com/homepage and click Create Repository

2, fill in the necessary information, click Create Repository


3. Create a successful page



4. Open git bash, create a GIFVIEWR work path, and clone your project. The project path is in the lower-right corner of the page

The command is as follows:

Create a Directory

mkdir Gifviewer

Clone code

git clone https://github.com/tanqiantot/gifviewer.git

After success you can see two files:

Ls-a

. Git redme.md


5. Try to push a change to remote

1) First modify the README.MD

2) Git status

$ git status
# on Branch Master
# changes not staged for commit:
# (use "git add <file> ..." To update what would be committed)
# (use "Git checkout-<file> ..." to discard changes in working directory)
#
# MODIFIED:README.MD
#

3) $ git add readme.md

4) Git status again

$ git status
# on Branch Master
# Changes to be committed:
# (use "git reset HEAD <file> ..." to Unstage)
#
# MODIFIED:README.MD
#

5) Git Commit

$ git commit-m "test1"
[Master 015b40b] Test1
1 file changed, 2 insertions (+)

6) Git push

$ git push https://github.com/tanqiantot/gifviewer.git master
Username for ' https://github.com ': Tanqiantot
Password for ' https://tanqiantot@github.com ':
Counting Objects:5, done.
Delta compression using up to 2 threads.
Compressing objects:100% (2/2), done.
Writing objects:100% (3/3), 307 bytes, done.
Total 3 (delta 0), reused 0 (Delta 0)
To Https://github.com/tanqiantot/gifviewer.git
ad8ff9c. 015b40b Master, Master

7) Review the GitHub website and find that your changes have been submitted successfully.


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.