is a distributed version control system that is popular for open source projects. To learn more about how to use Git, the
site is a great reference. The following is a step-by-step guide to get started using Git for your CodePlex projects.
Step 1: Create your CodePlex project (for project creator only)
Log-in to CodePlex and create a project. When selecting the source control, pick Git.
Once your project is created, click on the Source Control tab. Click the "Clone" action link to bring up connection details:
The clone URL is already selected and you can just type ctrl-C to copy the URL. We’ll be using this later.
Step 2: Set up Git
Download and install the latest Git tools for your operating system:
For the remainder of the guide, we’ll assume that you’re on a Windows system for screenshots.
After you’ve installed Git, you’ll want to provide Git with a username. Git uses this information to keep track of commit history, and CodePlex uses this to match commit history with CodePlex users. To do so, open the Git command line (Git Bash if you chose
the default installation options for Git on Windows) and type the following command:
git config --global user.name "username"
git config --global user.email "username@site"
Or you can provide Git with a repository local username and email by following command
cloning the project repository, in the project directory.
git config --local user.name "username"
git config --local user.email "username@site"
Step 3: Fork the repository (for coordinators or developers or non-members)
If you want to contribute source code, you should fork the project central repository to a personal repository, which is similiar to a dev branch in TFS. In the CodePlex project site, click the "SOURCE CODE" tab, then click the "Fork" action
link, and then click the "Create new fork" link. Provide a fork name, and click "SAVE" button. You can check the clone URL in the "Clone" action link. Below is an example.
For coordinators or developers, you can bypass this step and clone the central repository. However, you are strongly encourage to use the personal fork and collaborate with pull request and code review process.
Step 4: Clone the personal repository
Next, you’ll want to set up your repository on your local machine by cloning the repository on CodePlex. In the Git command line, change the directory to a folder where you want to store the source code of your project and then type the following git command:
git clone https://git01.codeplex.com/forks/username/NameOfFork NameOfFolder
where the URL is the clone URL you noted in Step 3, NameOfFork is the fork name you provided in Step 3, and NameOfFolder is the name of the folder where you want the source code to be stored (will be created if not exists).
Step 5: Push to your personal repository on CodePlex
Go to your newly created directory, and add your source code. Stage your changes using git add. For example, let’s say you add a readme file to your directory:
git add readme.txt
Commit your changes with a commit message:
git commit -m "my first commit to CodePlex”
Push your changes back up to CodePlex.
git push origin master
Type in your CodePlex username and password when prompted.
Visit your source code history on the project page and verify that your changes have been pushed by browsing to the source code tab.
Step 6: Create a Pull Request
Once you have pushed all of your changes to your fork (as well as making sure you have pulled the latest changes from the central repository), you’re ready to create a pull request.
From anywhere in the Source Code tab, click “Send Pull Request” in the action bar and select your fork.
On the Create Pull Request page, you can enter a title, comment, and review your changeset before sending. You also have the option of sending a pull request between branches in the same project
At this point, your pull request is waiting to be applied by project coordinators or developers. Once they have applied or denied your pull request, you will receive an email with their comments.