Using Git With TFVC
If is possible to use a local git repo with TFVC using Git-TF.
NB: All operations are done in the command line (cmd.exe)
Install
- Java runtime Environment: http://java.com/en/download/manual.jsp
- Add Java to PATH Environment variable e.g.C:\Program Files (x86)\Java\jre1.8.0_73\bin
- Install [gittf.codeplex.com](http://gittf.codeplex.com/) to C:\git-tf
Clone a Branch
- Make a parent directory for your repo and cd into it e.g.C:\Dev\Git\MyCompany.MyProject\Development
- Clone a branch e.g.git-tf clone https://tfs.mycompany.com/tfs/DefaultCollection $/MyProject/Development/MyBranch
Checkin changes to your local repo
Check in to your local git repo as you would normally with a comment.
This can be done in VStudio, on the command line or using a third party tool e.g.
- git commit -m "I did some stuff"
- SourceTree: https://www.atlassian.com/software/sourcetree/overview/
- TortoiseGit: https://tortoisegit.org/
Forward Integrate TFVC branch > local git repo
- cd to the directory e.g.cd C:\Dev\Git\PerfectChannel.AgriClear\Main
- Rebase:git-tf pull --rebase
Checkin your changes to TFVC
git-tf pull --rebase & git-tf checkin --associate=[workitem id]
More Information
Atlassian Git Tutorial: https://www.atlassian.com/git/tutorials/setting-up-a-repository
No comments:
Post a Comment