Github (1) - Getting Started


The purpose of using github : With Managed github project code

1.github page

1.1 The main interface

1.1.1github Home

After entering the login screen, click the octopus cat will return to this interface. The main user display dynamic, dynamic warehouse, users git repository.Here Insert Picture Description

1.1.2 Depot home

Display project information
Here Insert Picture Description
repository warehouse : that your project on github open source project, it is necessary to create a new warehouse. Warehouses used to store program code must be more open source projects have multiple warehouses.

star Favorite : Favorite others for next Project View. Depot home star the following figures for the number of collections of the project, if there are more than 100 collections, it is very incredible.

watch Watch : Watch a certain item, such as an update of the project, you will receive a reminder about the project.

replication fork cloning project : For an open source project, fork the project, will be in their own home a copy of a new, independent project of the original project.

Request Full : initiate request to merge the new code is written.

issue a card thing : If you find bug, to initiate discussions with the time. Joe Smith saw John Doe warehouse in question, initiated events to discuss issues in the John Doe warehouse issue, see John Doe can reply to close the issue.
For example: Joe Smith has a test called a warehouse. John Doe John Doe test access point Depot home when the fork, is generated in the John Doe account a test warehouse, and will be with 'forked from Joe Smith / test warehouse' prompt. Joe Smith can write code in this clone to the warehouse, if you want to update John Doe's test repository, you need to 'full request', Joe Smith saw John Doe made the request in their own home, I feel pretty good, can agree to merge to the original warehouse.
Contribution to the way open source projects: issue, pull request

1.1.3 Personal page

Display personal information, avatars
Here Insert Picture Description

1.2 Registration github account

Registration github account: official website, github.com
choose your settings page, free public projects, private warehouse charges: private not everyone can access,
user survey page, skip.
Tips:
1.github in foreign server, access is slow or inaccessible to the wall. shadowsocks
2. private warehouse charges
3. New registered users need to verify the mailbox before they can use. (QQ-mail white list settings, anti-spam, whitelist, enter the domain name github.com )

1.3 to create a new warehouse

Warehouse Name: General name for the project

Project Description: redeme file detailed description of the project content

New depot file: New File page the following form to fill in every time you want to submit the purpose, the reason , in order to allow other developers to know the reason for this modification.
Here Insert Picture Description
After submitting jump back to the warehouse interface, saving after each edit counted once submitted.
Click the file name, you can enter the file page modify and delete content. Reasons to remove deleted files can be written and then submit

Click to commit to see the details of each modification.
Here Insert Picture Description

Here Insert Picture Description

2 git- local warehouse

Purpose, management by git github hosting project code, after local New editing some code, through the terminal, uploaded to github profile

2.1 three regions

git work areas: New modify the code, the code will be uploaded to the staging area

git add hello.php

git staging area: the temporary files that have been modified, and finally submitted to the unified repository

git commit -m 'submit description'

Local git repository: to become a new version of the last people seen

2.2 git basic operations

View the current status

git status

Set the user name

git config --global user.name ‘chenyingyinglalala’

Setting a user's mailbox

git config --global user.mail ‘[email protected]

2.2.1 Creating a local repository

1. Create a new folder
2. Initial git in a file, create a warehouse. Open the folder in step 1 new asking price of the terminal, enter the following command in the terminal will generate a file .git, this is a hidden file, you need to set to see

git init

3. Add to the repository file, create a new file, file editing, file to normal operation: a write operation may be performed through a graphical interface or terminal.

4. The modified file file1.xxx added to the staging area

git add file1.xxx

5. Finally submitted to the local repository

git commit -m 'submit description'

2.2.2 git remote warehouse operations

github Workflow: New File - "workspace submitted to the staging area -" staging area - "Local Warehouse -" to the remote repository
purpose: backup, sharing

Cloning operation:

git clone https://github.com/chenyingyinglalala/test.git

git config --listgit

Here are two alternative learning remote operations blog URL, summary and detailed:
Ubuntu install and use git summary: git command sum up very neatly
https://blog.csdn.net/m0_37950361/article/details/80138929
under Ubuntu git installation and use: ssh Key created to explain in detail, but when Curry added keys, fancy recommend a blog
https://www.cnblogs.com/lxm20145215----/p/5905765.html

Guess you like

Origin blog.csdn.net/sinat_40624829/article/details/90549443