Skip to content
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

Subtree merge in Git-Tfs wiki repo #385

Merged
merged 1 commit into from
Jun 4, 2013
Merged
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
39 changes: 39 additions & 0 deletions doc/Bootstrap.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
## Summary

The bootstrap command allows you to quickly configure a cloned git repository for use with the original TFS repository.

## Synopsis

Usage: git-tfs bootstrap [parent-commit]
where options are:

-i, --id, --tfs-remote, --remote
(Type: Value required, Value Type:[String])
An optional remote ID, useful if this repository will track multiple TFS repositories.

-d, --debug
(Type: Flag, Value Type:[Boolean])
Show lots of output.

-H, -h, --help
(Type: Flag, Value Type:[Boolean])
ShowHelp

-V, --version
(Type: Flag, Value Type:[Boolean])
ShowVersion


## How to use this

`bootstrap` is useful if you create a TFS clone and share it with a colleague who then needs to interact with TFS. While two identical invocations of git tfs clone will produce identical repositories, git clone is always going to be faster than git tfs clone. So, I would guess that most people who want to collaborate on a TFS project using git will benefit from this command.

[user1] git tfs clone http://blah/blah/blah $/blah
[user1] cd blah
[user1] git remote add shared git@someplace:shared/repo.git
[user1] git push shared master
[user2] git clone git@someplace:shared/repo.git
[user2] cd repo
[user2] git tfs bootstrap

At this point, `user2` will be able to use all the normal git-tfs commands.
79 changes: 79 additions & 0 deletions doc/Change-history.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@

v0.17.1
-------

- Fixed `git tfs clone` broken in some cases in 0.17 (#330)

[Full diff](https://github.com/git-tfs/git-tfs/compare/v0.17.0...v0.17.1)


v0.17.0
-------

- [[branch]]
- [[labels]] (#256)
- git tfs pull --rebase (#254)
- git tfs clone --with-branches (#255)
- unicode support (#204)
- Use a custom workspace (#266)
- Clean workspaces directory (#269)
- Add a note on the commit to keep trace of the workitems (#276)
- Remove orphan folders (except in specific cases) (#323)

[Full diff](https://github.com/git-tfs/git-tfs/compare/v0.16.1...v0.17.0)

v0.16.1
-------

- Fixed `git tfs unshelve` (broken in 0.16.0) (#253).

[Full diff](https://github.com/git-tfs/git-tfs/compare/v0.16.0...v0.16.1)

v0.16.0
-------

- [[init-branch]]!! (#232)
- Faster clone (#226) and quick-clone.
- Add `git tfs info` (#219)
- Better metadata processing during rcheckin: remove the flags (#237), ignore whitespace (#238), add `git-tfs-force:` reason (#219).
- Always use CRLF in TFS checkin comments (#239)
- Checkin notes (#245)
- Use authors file more, and save it so you don't have to tell git-tfs about it every time you need it. (#252)

[Full diff](https://github.com/git-tfs/git-tfs/compare/v0.15.0...v0.16.0)

v0.15.0
-------

- Use [libgit2sharp](https://github.com/libgit2/libgit2sharp).
- Add default comment for shelves (#187)
- Add support for files with international characters (#200)
- Fix the mixed case problem (once and for all?) (#213)
- Add support for authors file
- Set up CI with [travis](http://travis-ci.org/git-tfs/git-tfs) and [teamcity](http://teamcity.codebetter.com/)

[Full diff](https://github.com/git-tfs/git-tfs/compare/v0.14.0...v0.15.0)

[v0.14.0](https://github.com/downloads/git-tfs/git-tfs/git-tfs-0.14.0.zip)
-------
- Fixed a bug in shelve (#133).
- Fixed rename problem in checkintool (#148).
- Fixed shelve -f (#157).
- Fixed (or unfixed) case sensitivity (#159).
- When a git subprocess exits with error, show the return/error code (#151).
- Add support for VS11.

[Full diff from 0.13](https://github.com/git-tfs/git-tfs/compare/v0.13.0...v0.14.0)

...


v0.12.1
-------
- Fixed: 'TF14045: The identity MYDOMAIN\John Doe is not a recognized identity' (#76, #81)
- Fixed: exception on unshelve if some items was renamed (#77)
- Fixed: rare problem when TFS' mixed mode assemblies cannot be loaded correctly (#93)
- Some fixes for Unicode filenames and TFS usernames (#80)
- git-tfs exit codes are now positive
- git-tfs cleans up files if clone command resulted in exception (#94)
- Restored VS2008 functionality (#99)
37 changes: 37 additions & 0 deletions doc/Checkin.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
## Summary

This function squashes differences between the last TFS commit and HEAD into one TFS-checkin and mark it as descendant of both previous TFS-checkin and HEAD.

It works similarly to [[checkintool]], except [[checkintool]] launches the standard TFS checkin window.

checkin differs from [[rcheckin]] in that the latter mirrors a series of commits into TFS instead of squashing them into one.

## Synopsis

Usage: git-tfs checkin [options] [ref-to-shelve]
where options are:
-d, --debug
Show debug output about everything git-tfs does

-i, --tfs-remote, --remote, --id=VALUE
The remote ID of the TFS to interact with

-m, --comment=VALUE
A comment for the changeset

--no-build-default-comment
Do not concatenate commit comments for the changeset comment.

--no-merge
Omits setting commit being checked in as parent, thus allowing to rebase remaining onto TFS changeset without exceeding merge commits.

-f, --force=VALUE
The policy override reason.

-w, --work-item=VALUE1:VALUE2
Associated work items:
e.g. -w12345 to associate with 12345
or -w12345:resolve to resolve 12345

--no-gate
Disables gated checkin.
41 changes: 41 additions & 0 deletions doc/Checkintool.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
## Summary

This function launches the standard TFS checkin window to commit your changes into TFS. It squashes differences between the last TFS commit and HEAD into one TFS-checkin and mark it as descendant of both previous TFS-checkin and HEAD.

It works similarly to [[checkin]], except [[checkin]] doesn't launches the standard TFS checkin window.

## Synopsis

Usage: git-tfs checkintool [options] [ref-to-checkin]
-h, -H, --help
-V, --version
-d, --debug Show debug output about everything git-tfs does
-i, --tfs-remote, --remote, --id=VALUE
The remote ID of the TFS to interact with
default: default
-m, --comment=VALUE A comment for the changeset
--no-build-default-comment
Do not concatenate commit comments for the
changeset comment.
--no-merge Omits setting commit being checked in as parent,
thus allowing to rebase remaining onto TFS
changeset without exceeding merge commits.
-f, --force=VALUE The policy override reason.
-w, --work-item=VALUE1:VALUE2
Associated work items
e.g. -w12345 to associate with 12345
or -w12345:resolve to resolve 12345
-c, --code-reviewer=VALUE Set code reviewer
e.g. -c "John Smith"
-s, --security-reviewer=VALUE
Set security reviewer
e.g. -s "John Smith"
-p, --performance-reviewer=VALUE
Set performance reviewer
e.g. -p "John Smith"
--no-gate Disables gated checkin.

## See also

* [[checkin]]
* [[rcheckin]]
1 change: 1 addition & 0 deletions doc/Cleanup-workspaces.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Clean up leftover TFS workspace mappings created by git-tfs (but this should never be the case).
3 changes: 3 additions & 0 deletions doc/Cleanup.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Clean all workspace directories (i.e. `.git\tfs\default\workspace` and workspace for branches) which are used for fetching and checkin changesets from TFS and also do what [[cleanup-workspaces]] does: clean up leftover TFS workspace mappings created by git-tfs.

This command could be run periodically to free some space.
83 changes: 83 additions & 0 deletions doc/Clone.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
## Summary

The `clone` command creates a new git repository, initialized from
a TFS source tree and fetch all the changesets

## Synopsis

Usage: git-tfs clone [options] tfs-url-or-instance-name repository-path <git-repository-path>
-h, -H, --help
-V, --version
-d, --debug Show debug output about everything git-tfs does
-i, --tfs-remote, --remote, --id=VALUE
The remote ID of the TFS to interact with
default: default
--template=VALUE Passed to git-init
--shared[=VALUE] Passed to git-init
--ignore-regex=VALUE a regex of files to ignore
--no-metadata leave out the 'git-tfs-id:' tag in commit
messages
Use this when you're exporting from TFS and
don't need to put data back into TFS.
-u, --username=VALUE TFS username
-p, --password=VALUE TFS password
--all, --fetch-all
--parents
--authors=VALUE Path to an Authors file to map TFS users to Git users
## Examples

### Simple

To clone all of `$/Project1` from your TFS 2010 server `tfs`
into a new directory `Project1`, do this:

git tfs clone http://tfs:8080/tfs/DefaultCollection $/Project1

### Clone only the trunk (or a branch)
Sometimes, it could be interesting to clone only a branch of a TFS repository (for exemple to extract only the trunk of your project and manage branches with `[[branch]]`. Then, do this (the clone will be done in the `MyProject1Directory` directory):

git tfs clone http://tfs:8080/tfs/DefaultCollection $/Project1/Trunk MyProject1Directory

### What repository path to clone?

If you don't know exactly what repository path to clone, see [[list-remote-branches]] command to get a list of the existing repositories.

### Excludes

Let's say you want to clone `$/Project`, but you don't want to
clone exes.

git tfs clone --ignore-regex=exe$ http://tfs:8080/tfs/DefaultCollection $/Project1

### Authentication

If the TFS server need an authentication, you could use the _--username_ and _--password_ parameters. If you don't specify theses informations, you will be prompted to enter them. If you use these parameters, the informations, git-tfs will store these informations (in the .git/config file --in clear--) and never prompt you again. If you don't want your password to be saved, don't use these options.

git tfs clone http://tfs:8080/tfs/DefaultCollection $/Project1 -u=DISSRVTFS03\peter.pan -p=wendy


### Map TFS users to git users

With the parameter _--authors_, you could specify a file containing all the mapping of the TFS users to the git users. Each line describing a mapping following the syntax:

DISSRVTFS03\peter.pan = Peter Pan <peter.pan@disney.com>

The clone command will be :

git tfs clone http://tfs:8080/tfs/DefaultCollection $/Project1 --authors="c:\project_file\authors.txt"

Once the clone is done, the file is store in the `.git` folder (with the name git-tfs_authors) and used with later `fetch`. You could overwrite it by specifting another file (or go delete it).


## After cloning a repository

It is recommended, especially if the TFS repository is a big one, to run, after a clone :
* a git garbage collect : `git gc`
* a [[cleanup]] : `git tfs cleanup`

## See also

* [[list-remote-branches]]
* [[init]]
* [[fetch]]
* [[quick-clone]]
1 change: 1 addition & 0 deletions doc/Contributing.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
See [Contributing.md in the Repo](https://github.com/git-tfs/git-tfs/blob/master/CONTRIBUTING.md)
79 changes: 79 additions & 0 deletions doc/Develop-on-mono.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@

## Building on Mono

Some manual changes (see below) are required in order to build git-tfs on Mono.

Once you have made the changes, you can use `xbuild` to build and the `mono-git-tfs` shell script to run git-tfs.

```
$ xbuild
...
$ ./mono-git-tfs help
+ GIT_TFS_CLIENT=Fake
+ mono ./GitTfs/bin/Debug/git-tfs.exe --version
git-tfs version 0.12.1.0 (37b71b4d) (TFS client library (FAKE)) (32-bit)
```

### Manual changes required to build on Mono.

Create a script called GetCurrentVersion and make it executable.

```
#!/bin/sh
git show --stat HEAD
```

Use unix's `cp` instead of `xcopy` to copy the VsFake plugin into the runtime directory.

```
diff --git a/GitTfs.VsFake/GitTfs.VsFake.csproj b/GitTfs.VsFake/GitTfs.VsFake.csproj
index 86f48df..9f7d4b6 100644
--- a/GitTfs.VsFake/GitTfs.VsFake.csproj
+++ b/GitTfs.VsFake/GitTfs.VsFake.csproj
@@ -115,6 +115,6 @@
</Target>
-->
<PropertyGroup>
- <PostBuildEvent>xcopy /y "$(TargetDir)*.dll" "$(SolutionDir)GitTfs\$(OutDir)"</PostBuildEvent>
+ <PostBuildEvent>cp -v $(TargetDir)*.dll $(SolutionDir)GitTfs\$(OutDir)</PostBuildEvent>
</PropertyGroup>
</Project>
```

Disable building of the normal TFS plugins, and other projects that depend on them.

```diff
diff --git a/GitTfs.sln b/GitTfs.sln
index c7ead94..3a1f885 100644
--- a/GitTfs.sln
+++ b/GitTfs.sln
@@ -40,8 +40,6 @@ Global
{55C169E0-93CC-488C-9885-1D4EAF4EA236}.Release|x86.Build.0 = Release|x86
{55C169E0-93CC-488C-9885-1D4EAF4EA236}.Vs2010_Debug|x86.ActiveCfg = Debug|x86
{55C169E0-93CC-488C-9885-1D4EAF4EA236}.Vs2010_Debug|x86.Build.0 = Debug|x86
- {DDFB4746-2BCE-4B34-8E45-056324CF140D}.Debug|x86.ActiveCfg = Debug|x86
- {DDFB4746-2BCE-4B34-8E45-056324CF140D}.Debug|x86.Build.0 = Debug|x86
{DDFB4746-2BCE-4B34-8E45-056324CF140D}.Release|x86.ActiveCfg = Release|x86
{DDFB4746-2BCE-4B34-8E45-056324CF140D}.Release|x86.Build.0 = Release|x86
{DDFB4746-2BCE-4B34-8E45-056324CF140D}.Vs2010_Debug|x86.ActiveCfg = Debug|x86
@@ -52,19 +50,13 @@ Global
{7C7FEA7A-24A1-4834-9815-1DF980C340F3}.Release|x86.Build.0 = Release|x86
{7C7FEA7A-24A1-4834-9815-1DF980C340F3}.Vs2010_Debug|x86.ActiveCfg = Debug|x86
{7C7FEA7A-24A1-4834-9815-1DF980C340F3}.Vs2010_Debug|x86.Build.0 = Debug|x86
- {09BF8124-19A8-45BE-896B-536CA0F3F0FC}.Debug|x86.ActiveCfg = Debug|x86
- {09BF8124-19A8-45BE-896B-536CA0F3F0FC}.Debug|x86.Build.0 = Debug|x86
{09BF8124-19A8-45BE-896B-536CA0F3F0FC}.Release|x86.ActiveCfg = Release|x86
{09BF8124-19A8-45BE-896B-536CA0F3F0FC}.Release|x86.Build.0 = Release|x86
{09BF8124-19A8-45BE-896B-536CA0F3F0FC}.Vs2010_Debug|x86.ActiveCfg = Debug|x86
- {C5A374D3-A2E1-407C-9D6D-541FDB53BD62}.Debug|x86.ActiveCfg = Debug|x86
- {C5A374D3-A2E1-407C-9D6D-541FDB53BD62}.Debug|x86.Build.0 = Debug|x86
{C5A374D3-A2E1-407C-9D6D-541FDB53BD62}.Release|x86.ActiveCfg = Release|x86
{C5A374D3-A2E1-407C-9D6D-541FDB53BD62}.Release|x86.Build.0 = Release|x86
{C5A374D3-A2E1-407C-9D6D-541FDB53BD62}.Vs2010_Debug|x86.ActiveCfg = Debug|x86
{C5A374D3-A2E1-407C-9D6D-541FDB53BD62}.Vs2010_Debug|x86.Build.0 = Debug|x86
- {B2BF1C1C-BB58-4DEF-BFEF-DE0D2FE2E8F7}.Debug|x86.ActiveCfg = Debug|x86
- {B2BF1C1C-BB58-4DEF-BFEF-DE0D2FE2E8F7}.Debug|x86.Build.0 = Debug|x86
{B2BF1C1C-BB58-4DEF-BFEF-DE0D2FE2E8F7}.Release|x86.ActiveCfg = Release|x86
{B2BF1C1C-BB58-4DEF-BFEF-DE0D2FE2E8F7}.Release|x86.Build.0 = Release|x86
{B2BF1C1C-BB58-4DEF-BFEF-DE0D2FE2E8F7}.Vs2010_Debug|x86.ActiveCfg = Debug|x86
```
Loading