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.