Let's say I have a Project
called Tools
.
Tools is a ClassLibrary
containing ExtensionMethods, Helpers, etc.
Different products use different references Tools compiled in various .net framework versions.
I've worked with TFS for a long time so I have problems migrating to git.
This is the structure I have on disk AND also in the "Source Control Explorer" in Visual Studio.
I am used to use the Visual Studio GUI to Merge and Branch Changesets across Branches.
I was not able to create a similar environment with git. Where I can push from one branch to the other back and forth.
I would like to have just 1 repository for "Tools" while having the different branches stored on disk (checked out or not).
Probably the easiest way is create branches for each version and then do for example git checkout v1. 0.14 or whatever branch you want to work on. The clients can then also check out the appropriate branch for the one they need as well as when upgrading to next version.
Yes. You can put multiple projects in one Git repository but they would need to be on different branches within that repo.
About version control and Git A version control system, or VCS, tracks the history of changes as people and teams collaborate on projects together. As developers make changes to the project, any earlier version of the project can be recovered at any time.
To compare any two commits in your branch, use the Ctrl key to select the two commits that you want to compare. Then right-click one of them and select Compare Commits. Similar to Commit Details, you can use the Open in New Tab button to open the comparison on a different tab or maximize it on the screen.
I think I understand what you want to accomplish based on your comments and I'll propose a solution but please let me state first that the way TFS and GIT work with branches and merges are quite different. In GIT you don't have the need to download every branch to a separate folder like we used to do with TFS; in GIT you work and switch branches on the same working folder quite easily.
If you need have all the branches checked out to be able to build faster (or whatever) what I propose is:
1) Consider one folder/build as the master/trunk/latest (or any terminology you are familiar with) and use that as the main branch
2) Clone the same repo to different folders, each folder representing the build (branch) you want to use
3) In each folder/repo checkout the branch you are going to be working in
4) You can work with the different branches on these folders and push/pull to all the other ones while having only one repo
Please, I repeat again, this is not the ideal way of working with GIT. If you're using newer versions of Visual Studio the integration with GIT works seamlessly.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With