How do I use git-tfs and idiomatic git branching against a TFS repository?
How Do I Use git-tfs Idiomatically?
The git idiom is to check out branches to the root directory of the repository. Checking out a branch will replace the contents of the directory with the contents of that branch.
The TFS idiom is to check out each branch in a different directory under the root directory of the repository (even the master or trunk branch). Checking out a branch will place it in a new directory next to the current one.
Using git-tfs, I can clone a TFS repository or branch into a git repository. I want to work on a TFS repository with multiple branches in a manner consistent with the git branching idiom. But I'm not sure what's technically possible or recommended :)
Clone The Whole TFS Repository
If I clone the whole repository out of TFS
c:\repo> git tfs clone http://<tfsurl>:8080 $/main
That would give me a git
master containing all the TFS branches as directories.
c:\repo [master]> dir
Add a Remote Per TFS Branch
I don't know if I can (or how to) map a git remote to each TFS branch.
c:\repo> git init .
c:\repo [master]> git tfs clone http://<url> $/main/trunk .
c:\repo [master]> git checkout -b feature-logon
c:\repo [feature-logon]>git tfs clone http://<url> $/main/feature-logon .
I know this is technically incorrect, but I don't know any better without playing (my only TFS repo is very large, experimenting is taking a long time)
Some repository clones I have allow me to do this: % git pull % git push But other repositories require me to type: % git pull origin master % git push origin master I think I am missing something i
I'm going to happily switch from TFS to git. I can't afford losing the check-in history or my branches. What is the least painful way to convert my TFS repository into a git repository by turning each
we are using git in Team Foundation Service, and we are trying to find a way to delete a remote branch by running the following command. git push origin --delete TheBranchName The remote server keep
What are some use cases for a bare Git repository? When should we prefer to use a bare repository and what benefits it gives us? If I need a repository for sharing with a team and pulling changes from
I have cloned a git repository and I would like to switch to a particular branch from the following list (e.g. branch1, branch2, branch3) Should I have to say git fetch origin branch2? How do I know t
I created an app and deployed it to Heroku, but I didn't have a github git repo (I know really bad idea!) and my local git repo has been deleted (just plain stupidity here). So I have no copies of my
Setting up a git repository with some messy commits. Everything is working and all good, but I would like to remove/delete the messy commits - how do you go about doing that? Thanks
I am trying to clone a TFS repository using git-tfs. It works great with TFS projects that don´t have a space in the name, such as: git tfs clone http://tfs:8080/ $/TeamProject/folder But I also have
I understand that Araxis Merge is now a fully supported mergetool for Git, so that much of what I can find about configuring Git to use it is now out of date. In particular, Araxis Merge should work
I have created a Git repository on my Desktop machine (Windows 7) with: git init git add <all my files> git commit -m added my files Now I have installed a new Ubuntu Server 10.10 on a machin
We are considering moving from SVN to TFS, so I am trying to find a proper workflow to follow in TFS to accommodate our needs. There are a lot of branching scheme discussions out there, but most that
I have a situation where I am using TFS builds to deploy an MVC site to various environments. I would like to use the web.config transforms with the TFS builds to ensure things like connection strings
Create a git repository in some directory. Add all the files in that directory and commit them. Then create another git repository in a parent directory and add all files. Clone that repository elsewh
Once upon a time we had a TFS repository. We wanted to move to Git. At the time we took just the latest working version, copied that to a new git repo and started working on that. However due to decom
How do I use DTO's with EF, Autofac, and a generic data repository? I'm in the process of setting up a new project and have configured my DI/IoC (Autofac), using a generic repository for data access t
How do I pull from another local repository in GIT? For example, I have cloned the origin repository on two computers. Then, I go ahead and make some changes and commit to the local repository of comp
I want to learn how to do more complex operations using Git. Currently I use GitHub and I can: clone a repository init a new repository add and remove files from a repository make commits push commi
I have a running git folder where I can push my commits to the remote repository, but I didn't configure it myself. How can I find out how it is configured? Where does it push to, wiht which username
How can I bookmark a project in TFS for quick access. we have a huge project repository with branching and many levels of hierarchy. I'm looking for some way to mark my favorites projects in Team Expl
I would like to replicate my local git repository, (recently converted from svn), into my empty github account. I do not want to show every detailed commit, but rather larger aggregated changesets cor
I have installed GitTfs 0.15.0 and am trying to clone under Cygwin. I've done the following: Extracted into a directory, GitTfs-0.15.0 chmod +x for every file in GitTfs-0.15.0 Added GitTfs-0.15.0 to
I know a git repository where their authors are committing changes in the same branch as the upstream repository and they merge with upstream sometimes. How may I know what patches are exclusive of a
To delete a local branch in git I use git branch -d, but how do I safely remove a remote branch? I would like to delete it only when the remote branch is merged to my current branch.
I have multiple git repositories I need to connect to. For each one, the person in charge emailed me a public/private keypair to use to access the repository. I stored them in my .ssh directory along
Without access to git and git-submodule, I need to incorporate a shared-ip repository into two separate project repositories while minimizing the overhead of branching. People on either project need t
I have a local repository with a master branch that works fine. I would like to publish the Repository to a folder called C:\Users\bgreer\Dropbox\Development\Repos\Tooling. I went into this folder and
I finished to commit and push changes on remote git repository but when I view remote repository's files, these are outdated. I'm using Git Bash. View image The red text are changes made in repositori
I want to clear the remote repository and push the new files. I' am getting git commit -m fix # HEAD detached from 0027561 nothing to commit, working directory clean and nothing is pushed to the
To me it seems completely obvious to use pure git, but I am in the position of having to articulate why using pure git is a superior solution to using TFS via git-tfs. The company I work for has a po
How do you link a single file from another git repository to your own repository? I don't want the full repository, just a single file. Using git submodule seems like the right route to go, but it wan
I am pretty new to TFS and source control. I unable to understand the advantage of branching. Since i can do the same stuff by creating 2 folder main and development, when I am done with development.I
I can tell Git where the Git repository is with --git-dir. I can tell Git where the working tree is with --work-tree. How do I tell Git where the gitignore file is? Q. Why would I want to do such a th
I have recently taken over a development project that has a Git repository linked to a remote repository hosted on Git Hub. I have full access to the server that hosts the project and has the Git repo
I'm new to git and trying to figure out the best way to copy an existing GitHub.com repository owned by another user to a private git server I have on Atlassian Stash. Ideally we could do a copy at le
I'm very new to git. I have these 2 branches on my remote repository (github) development , master How do I merge development into master on the remote repository? I've tried git merge development and
I have a code repository in TFS (Microsoft Team Foundation Server). I can use git-tfs to convert this to a git repository. But what I want to do is set up one central git repo that pushes to TFS, and
When you are creating projects under one collection on TFS there is still one database for each team project collection (name should be Tfs_Collection). For reference: http://msdn.microsoft.com/en-us/
Greg's comment help me understand tortoisegit push successfully, but no new files? How do I create a local bare repository with tortoisegit? I can right click and clone a repository from github and pu
If you are in a corporate setting with many people working on a particular application, is it going against the grain of a distributed version control system to have an official central repository? So
How to use git-svn clone to only get the HEAD vevision from a Subversion repository? I been trying git svn clone -s http://svn/java/<projectname> but I been getting a lot of empty directory an
I am trying to maintain a bare copy of a Git repository and having some issues keeping the remote tracking branches up to date. I create the remote tracking branches like this: git branch -t 0.1 origi
I have a local Git repository. I would like to make it available on a remote, ssh-enabled, server. How do I do this?
I cloned TFS repo to my local Git and then tried to change TFS remote to another repository to transmit all the changesets to it using the following commands: git tf --force configure http://tfs2012:8
I'm having trouble figuring out what to do manage the branches in my project. I have been working on a feature branch, loads, which was branched off of dev. Since branching, dev has moved forwar
I'm using git-svn to track an svn repository with several branches. One of the server branches I've been working with has been renamed in the svn repository. Git-svn doesn't seem to understand what's
This seems like it should be simple, but I can't figure it out. I'm happy to use the website or the command line. EDIT: Say there is some repository/user named foo on GitHub, and there is a project na
I seem to have a small issue with my script where I need to call tied against a sub routine that is earlier in the the script so that I can access the functions that are related to the object that t
I'm trying to configure Git to use Plink, now for some reason this option isn't available to me I tried uninstalling and reinstalling Git a hundred times I can't get to this option
I currently have a personal git repository for some software that I have been working on. The repository used to contain personal information of other people in some of the configuration files, which
When I clone a repository from github or any other website and type: git status it checks the current branch for changes against origin remote and shows the message (before making any new commits) : Y