Collaborate in a Git team project (pull, push)
When you collaborate on Team Foundation Server (TFS), your team uses version control integrated with other powerful capabilities such as planning and tracking projects and automated CI and scheduled builds. You can create a Git team project on either an on-premises server that you set up yourself, or on one that we maintain for you in the TFS cloud. Or, if you prefer, you can collaborate in remote Git repositories hosted by third-party services such as CodePlex, GitHub, or Bitbucket.
If you want to preview the changes from your team before you integrate them into your work, from the commits page (Keyboard: Ctrl + 0, O), fetch commits from your team project.
After you fetch a commit, to get more information, open its context menu and choose View Commit Details.
You must also fetch before you can get a copy of a branch that someone on your team has published.
When you are ready to integrate changes from your team into your local repository, in Team Explorer, go to the commits page (Keyboard: Ctrl + 0, O). Pull any commits that might have been pushed by your team.
If conflicts occur…
you must resolve them before you can proceed.
When you are ready to contribute your committed changes to the team’s remote Git repository, push them from the commits page (Keyboard: Ctrl + 0, O).
If your team has pushed commits to the branch since you last cloned or pushed, then you must first pull all the changes from the remote repository before you can push your changes into it.
In some cases, you might want to push to an alternate remote repository. (You must have installed Visual Studio 2013 Update 2 or a subsequent version to use this feature.)
For example, you are developing a web site in a Git team project. You want to publish the web site to Windows Azure, so you add your Windows Azure site as a remote repository. When you are ready to publish the site, you can push to it.
To browse the team project, open it in your web browser (Keyboard: Ctrl + 0, A).
Before you explore the files, specify the branch or tag you want to use to filter the view.
On the Explorer page, browse the file tree and view each file. You can also see who changed what in each file.
You can also:
Get the URL to clone the repository. (You don’t need a URL to clone a repository from Visual Studio, but you might need it if you want to clone from the Command Prompt or from a third-party Git client tool.)
Download an individual file and download a folder as a .zip file
Perform an Advanced search for a specific commit based on path, user (the author of the commit), and date
Do you want to be notified when someone pushes code into your Git team project? Subscribe to receive email alerts. Here’s how.
You can add additional repositories to your Git team project. Later, you can rename or delete them as needed. One benefit of working this way is that you can re-use process template customizations, such as those you’ve made to your work item type definitions, across multiple codebases.
To manage the Git repositories in your team project, open it in your web browser (Keyboard: Ctrl + 0, A).
Create a new repository when you need one (for example, to develop a new app).
In Visual Studio, select the repository in which you want to work.
A: One common reason Push is unavailable is if you are working in a branch that you have not yet published. Switch to the Branches page (Keyboard: Ctrl + 0, N) if you want to publish the branch.