Skip to content

Using git-tfs #43

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions migration-to-git/3-working-with-git/git-fts-as-bridge.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
---
layout: default
title: Using TFS and Git together
---

If you need continue checking-in to TFS along you work with Git, you can use git-tfs as a bridge.

It supposed that git-tfs supports to check-in in name of another developer, but for some reason (maybe TFS permissions, maybe it is not ready yet, maybe my fault) it didn't work for me, so, in our team we decided that each developer check-in in TFS his changes after merge his pull requests.

### 1. Prepare environment for developers

* Clone GitHub repository <!-- TODO -->
* Bootstrap git-tfs <!-- TODO -->

### 2. Work in a feature

<!-- TODO (fetch remotes, fetch tfs, start a new branch, commit changes) -->

### 3. Create a pull request

<!-- TODO (Rebase or merge upstream changes, create the pull request, discuss) -->

### 4. Merge pull request and check-in in TFS

<!-- TODO (Merga the pull request, fetch remotes, fetch tfs, check-in in TFS, push to upstream) -->
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since this is being redacted in first person, maybe we should include who the author is?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are right, I will try to remove subjectiveness from git-fts-to-github articule and move git-fts-as-bridge article under DCA flow.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it is not redacted in first person... for example, it starts with "Prepare..." instead "I prepare...", another sentence says: "Work..." instead "I work..." Maybe I am wrong...

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hehe, it is not well redacted. But JD is fine, the original idea of this file was to describe how we (DCA team) are using git-tfs.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The examples that I found:

but for some reason (maybe TFS permissions, maybe it is not ready yet, maybe my fault) it didn't work for me, so in our team we decided...

The same command allows to clone all the branches (but I didn't test it)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, ok... I had not read the whole document.

36 changes: 36 additions & 0 deletions migration-to-git/3-working-with-git/git-fts-to-github.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
---
layout: default
title: Clone a TFS repository to GitHub
---


### 1. Clone TFS to a local git repository

The command [clone](https://github.com/git-tfs/git-tfs/blob/master/doc/commands/clone.md) allows to clone a branch with all _changesets_.

![git-tfs clone](git-tfs-clone.png)

The same command allows to [clone all the branches](https://github.com/git-tfs/git-tfs/blob/master/doc/commands/clone.md#clone-all-the-branches-and-merge-changesets)) (but I didn't test it).

![git-tfs clone with branches](git-tfs-clone-with-branches.png)

But it used to fail:

![git-tfs clone with branches broken](git-tfs-clone-with-branches-broken.png)

If you don't need the complete history, it is possible to get only the last _changeset_ with the command [quick-clone](https://github.com/git-tfs/git-tfs/blob/master/doc/commands/quick-clone.md).

![git-tfs quick-clone](git-tfs-quick-clone.png)

### 2. Prepare repository for Git

<!-- TODO (git configuration files, delete files, etc) -->

### 3. Create a new GitHub repository

<!-- TODO -->

### 4. Push local cloned commits to GitHub repository

<!-- TODO -->

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 8 additions & 0 deletions migration-to-git/3-working-with-git/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,14 @@ that [Git Extensions]({{ site.github.url }}/migration-to-git/3-working-with-git/
is a good choice to start because it helps you to understand how Git is working
internally.

### git-tfs

It is an useful tool when you have to migrate a TFS repository and also when Git and TFS should co-exist.

See [git-tfs readme](https://github.com/git-tfs/git-tfs/#readme) for a complete reference.

* [Clone a TFS repository to GitHub](git-fts-to-github.html)
* [Using TFS and Git together](git-fts-as-bridge.html)

---

Expand Down