180 likes | 488 Views
GIT version control. What is GIT. Have you ever wished you could travel back in time when you develop a project …? Have you ever wished you could collaborate with your friend on the same project or file at the same time…?
E N D
What is GIT • Have youeverwishedyoucouldtravel back in time whenyoudevelop a project…? • Have youeverwishedyoucouldcollaborate with yourfriend on the same project or file at the same time…? • Everwishedyou had a fast reliable and secure backup…? • GIT offers a remote backup, a possibility to load the project just before the disaster and an easyway to collaborate with yourfellow students
What do I need http://git-scm.com/ https://code.google.com/p/gitextensions/
Git Extensions • Git has a console line interface • Git Extensions offers a GUI to easeyourdailywork with GIT • Git Extensions willinstall a plugin intoyourvisualstudiowhenyouinstall it • In order to do solvesome ‘mergeconflicts’ youshouldinstall kdiff3
Getyourproject under control • Execise • Installboth ‘GIT’ and ‘GIT Extensions’ • Restart yourvisualstudio and locate the new plugin in the top leftcorner • Create a new project • Click on the yellow folder • Clickyes to initialize a new gitrepository • Clickcommit and addyourproject to git • Make somechanges and commitagain • Make somechanges and commitagain • Make somechanges and commitagain • Make somechanges and commitagain
Congratulations – That’s it! • Now you know how to use GIT
Git Extensions, .gitignore • Click “Add default ignores” button • Add a few more like .exe etc. • Click the “Save” button Version control, using Git
SomeDetails… Branches • In the previousexerciseweavoidedconflictsbecausewedidn’t step back and workedalone. • Imagine wechangeour mind and wants to step back and continueworking
Collaboration / backup • Git is a decentralizeddistributed version control system • If youcreate a remoterepositorysomewhereyou have still have an exactcopy on yourlocalmachine. • If youshareyourremoterepositiory with fellow students theyget a exactcopy of the repository.
Working with a remote repositoryFigure from http://git-scm.com/book/en/Distributed-Git-Contributing-to-a-Project Version control, using Git
Github.com || BitBucket.org • Github is free for open source projects (use general open port) • Bitbucket offers a freeclosedproject for 5 memebers
Exercise • Make a team of 4-5 people • Create a project on one computer add it to bitbucket or github • Follow the online wizard to upload a repository • Add the rest of the team to the remoterepository • Commit to the projects and solve the conflicts…
Resources • A free book onlinehttp://git-scm.com/book • Videoshttp://git-scm.com/video/ • PDF: Git Magic by Ben Lynn • Console online training
Using Git in Visual Studio • http://msdn.microsoft.com/en-us/library/hh850437.aspx • http://stackoverflow.com/questions/19982053/how-do-i-add-an-existing-solution-to-github-from-visual-studio-2013