Using Git For Visual Studio Version Control
Git is a distributed version control system. Instead of running "svn checkout (url)" to get the latest version of your repository, with Git you run "git clone (url)", which gives you a complete copy of the entire history of that project. This means that immediately after the clone, there is basically no information about that project that the server you cloned from has that you do not have.
This gives you some immediate advantages. One is that nearly every operation is now
done off data on your local disk, meaning that it is both fast and can be done
offline. You can do commits, diffs, logs, branches, merges, file annotation and
more – entirely offline. Most commands you run in Git take longer to type then
they do to execute.
Another advantage of this model is that your workflow does not have a single point of failure.
Since every person working on your project has what is essentially a full backup
of the project data, losing your collaboration servers is a minor inconvenience
The final advantage is the workflows that are now available to you. Git does not
depend on a centralized server, but does have the ability to synchronize with
other Git repositories – to push and pull changes between them. This means that
you can add multiple remote repositories to your project, some read-only and
some with write access as well, providing a lot of flexibility.
You can continue to use a centralized workflow, with one central server that everyone
pushes to and pulls from. However, you can also do more interesting things. For
example, you could have a remote repository for each user or sub-team in your
group that they have write access to, then a designated maintainer or QA team
or integrator can then pull their work together and push it to a "master"
repository that is deployed from.
Git for Windows:
Tortoise Git: (Git Extensions also offers Windows Explorer integration)
Git Extensions for Visual Studio:
Git Extensions provides a top menu "Git" item in Visual Studio, allowing
you to perform most every operation directly from within Visual Studio while
working on a project. You can also work via the context menu items in Windows
Explorer. It also has a comprehensive installer that will install "everything
you need" if you want to go that route.
In summary here are some of the major "pros" of using Git:
• Upload and download takes less time due to good compression.
• Overall faster command execution (better performance).
• You commit to your local repository first. This means you can commit
without normal wait times. No need to have Internet connectivity.
• You can do the upload to the server of several commits in one go.
• Git Bash gives you the option to work in a Linux command shell.
• Allows some nice advanced use (mass delete / rename etc).
• Git GUI has most of the needed git command available easily via key shortcuts.
• GitExtensions has a nice all-in-one installer making it easier to install.
• No messing with SVN folders (no .svn folder in each folder).
• All the files of the local repository are in one .git folder
at the top most level.
• Powerful and easy branching and merging.
• Optimized for large complex merges.
• You can just remove or rename files via explorer (no extra
rename/delete command needed as git tracks content not files).
• Less hard drive use compared to SVN.
By Peter Bromberg Popularity (2673 Views)