This guide is about Collaborative coding.

Correspondingly, this process can be divided into many stages.Steps are as follows.

If you wanna to quickstart, you should know your collaborator’s Public Key and add your SSH KEY profile.

And make sure this SSH KEY is not be used on this github account.

Create Repository

To put your project up on GitHub, you will need to create a repository for it to live in.

Learn to use and manage the repositories that allow you to store and collaborate on your project’s code.

You can store a variety of projects in GitHub repositories, including open source projects.

With open source projects, you can share code to make better, more reliable software.

You can use repositories to collaborate with others and track your work.

  • Step1: In the upper-right corner of any page, use the drop-down menu, and select New repository.

  • Step2: Type a short, memorable name for your repository. For example, “hello-world”.

  • Step3: Optionally, add a description of your repository. For example, “My first repository on GitHub.”

  • Step4: Choose a repository visibility. For more information, see “About repositories.”

  • Step5: Select Initialize this repository with a README.

  • Step6: Click Create repository.

Commit your Code

A commit is like a snapshot of all the files in your project at a particular point in time.

When you created your new repository, you initialized it with a README file. README files are a great place to describe your project in more detail, or add some documentation such as how to install or use your project. The contents of your README file are automatically shown on the front page of your repository.

Let’s commit a change to the README file.

In the upper-right corner of your repository page, copy your SSH url then you can click TortoisGit’s setting and add the url to your Remote -> Url -> Putty Key is your public Key (C:\Users\Stray.ssh).

Completed these steps, you can fork or commit projects to Github Repository.

Resolving a merge conflict

You can resolve simple merge conflicts that involve competing line changes on GitHub, using the conflict editor.

You can only resolve merge conflicts on GitHub that are caused by competing line changes, such as when people make different changes to the same line of the same file on different branches in your Git repository. For all other types of merge conflicts, you must resolve the conflict locally on the command line.

In the "TortoiseGit" list, click the right mouse with a merge conflict that you'd like to resolve.

Decide if you want to keep only your branch’s changes, keep only the other branch’s changes, or make a brand new change, which may incorporate changes from both branches. Delete the conflict markers <<<<<<<, =======, >>>>>>> and make the changes you want in the final merge.

If you have more than one merge conflict in your file, scroll down to the next set of conflict markers and repeat steps four and five to resolve your merge conflict.

Once you’ve resolved all the conflicts in the file, click Mark as resolved.

If you have more than one file with a conflict, select the next file you want to edit on the left side of the page under “conflicting files” and repeat steps four through seven until you’ve resolved all of your pull request’s merge conflicts.

Once you’ve resolved all your merge conflicts, click Commit merge. This merges the entire base branch into your head branch.

If prompted, review the branch that you are committing to.

If the head branch is the default branch of the repository, you can choose either to update this branch with the changes you made to resolve the conflict, or to create a new branch and use this as the head branch of the pull request.

If you choose to create a new branch, enter a name for the branch.

If the head branch of your pull request is protected you must create a new branch. You won’t get the option to update the protected branch.

Click Create branch and update my pull request or I understand, continue updating BRANCH. The button text corresponds to the action you are performing.