How a team of git tutorials works collaboratively on GitHub

Source: Internet
Author: User
Tags ssh how to use git using git git clone

I've previously documented how to upload my own project to my personal GitHub account, and how to use Git for versioning when the team is working together.

1. Upload your own code to GitHub on the project's initiator or leader
([Don't know how to upload your own code to github, click on this link]http://blog.csdn.net/gpwner/article/details/52829187)

This time, I'm taking an example of this project on Gpwner Recyclerview.

2. Click on the project's setting->collaborators and enter the team member's GitHub account

Then just sit and wait for the team member to agree, here is the assumption that Gpwner is the Leader,dikeyuta member of the project.
3. Log in to their account on the team member's PC, where the mailbox is signed in Dikeyuta bound

You can see that the Dikeyuta-bound mailbox has received an invitation from Gpwner, click
View Invitation, then jump to the following interface

Click on accept invitation to do it.
4. Now leader login to your account to see that team members have successfully added to the project's collaborators

5.DiKeYuTa clone down the project on your own PC
I'm using git ([git install tutorial, click into]http://blog.csdn.net/gpwner/article/details/52829187) ****************************** ******************************************

If you do not have SSH key configured, configure the following steps as follows: Right-click anywhere on the PC and select

Then enter:

Ssh-keygen-t rsa-c "youremail@example.com"
//youremail@example.com is your mailbox when you register with GitHub

Then go all the way to the car and know that the Sshkey path created by the prompt indicates that your SSH has been created successfully.

My Sshkey is in: C:\Users\Gpwner.ssh
Enter the directory open id_rsa.pub, not open the option to open the way for Notepad to copy good content


Then in https://github.com login Dikeyuta account, enter the personal account setting->ssh and GPG key->new ssh key, enter the title and copy of the SSH key, it is best to click Add SSH Key

Back to Git bash
Enter the following instructions to verify the configuration is successful:

Ssh-t git@github.com

The following figure illustrates that your SSH has been configured successfully.
************************************************************************

Copy the Git remote address into the leader project.

Right-click anywhere on the PC and choose Git bash here

Then enter Git clone git@github.com:gpwner/recyclerview.git, and wait for clone to finish.

6. After the above steps, all the preparations have been completed the next step is to update your code to the remote repository on GitHub, where I have added a TXT file example in the Clone down project,

I created a new November 12, 2016 130728.txt file under clone under the project directory, and then went back to git bash.
Each time you submit a new code, you need to synchronize the remote repository to see if anyone else has an update, or your code will not be able to submit it.
Input:

Git pull
git Add.
Git commit-m "bbb"
git push

If you do not synchronize a direct submission, you may report the following error:

! [Rejected]        Master-to-master (fetch first)
error:failed to push some refs to ' git@github.com:gpwner/recyclerview.git '
hin T:updates were rejected because the remote contains work, that you do
Hint:not has locally. This was usually caused by another repository pushing hint:to the
same ref. Want to first integrate the remote changes
hint: (e.g., ' git pull ... ') before pushing again.
Hint:see the ' Note about Fast-forwards ' "Git push--help ' for details.

Return to Leader's account, you can see Dikeyuta just submitted the things have been synchronized to the remote warehouse

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.