Collaborating
We can find a project we want to collaborate on and clone it. Cloning makes a local copy of the files in a repository for you to work with. You can clone a repository and push changes to it if you're a collaborator and have read and write permissions.
How if I am not a collaborator?
You have to fork it on github.com before you can push changes to it. Fork means create a copy of existing repository that you can do whatever you want with. You won't be able to push your changes, but you can create a pull request on GitHub to the original owner and if they like your changes, they can merge them in.
Try it to start collaborating:
- Search for "TeamPowered" in GitHub.
- Choose "Clone or Download" and choose "Open in Visual Studio".
- It will open Visual Studio and click on "Clone".
- Because we are working on team, we should to create a new branch differ than our current "Master" branch.
- Click on "branch" on the bottom-left screen, then "Manage Branch" or "Home" and then "Branches".
- Right-click on master and choose "New Local Branch from".
- Named it with "CleanupBranch". Remember, it is not synced with the remote repository yet.
Merge Branch
- If we succeed in pushing our "CleanupBranch", think if somebody commit it in "Master" branch.
- We'll need to get their changes into our branch so we can keep the chances of conflict to a minimum. We can try out ourselves by switching to the master branch and making some changes there.
- Go to branches, double click on "Master" and notice our change went away.
- We need to merge our branch with "Master"
- Go to "branches", right click our branch and choose "merge from" master branch.