GIT version control. What is GIT Have you ever wished you could travel back in time when you develop...
-
Upload
leslie-norris -
Category
Documents
-
view
222 -
download
5
Transcript of GIT version control. What is GIT Have you ever wished you could travel back in time when you develop...
![Page 1: 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.](https://reader035.fdocuments.in/reader035/viewer/2022062408/56649ee55503460f94bf4078/html5/thumbnails/1.jpg)
GIT version control
![Page 2: 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.](https://reader035.fdocuments.in/reader035/viewer/2022062408/56649ee55503460f94bf4078/html5/thumbnails/2.jpg)
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…?• Ever wished you had a fast reliable and secure backup…?
• GIT offers a remote backup, a possibility to load the project just before the disaster and an easy way to collaborate with your fellow students
![Page 3: 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.](https://reader035.fdocuments.in/reader035/viewer/2022062408/56649ee55503460f94bf4078/html5/thumbnails/3.jpg)
What do I need
https://code.google.com/p/gitextensions/http://git-scm.com/
![Page 4: 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.](https://reader035.fdocuments.in/reader035/viewer/2022062408/56649ee55503460f94bf4078/html5/thumbnails/4.jpg)
Git Extensions
• Git has a console line interface• Git Extensions offers a GUI to ease your daily work with GIT• Git Extensions will install a plugin into your visual studio when you
install it• In order to do solve some ‘merge conflicts’ you should install kdiff3
![Page 5: 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.](https://reader035.fdocuments.in/reader035/viewer/2022062408/56649ee55503460f94bf4078/html5/thumbnails/5.jpg)
Get your project under control
• Execise• Install both ‘GIT’ and ‘GIT Extensions’• Restart your visual studio and locate the new plugin in the top left corner
• Create a new project• Click on the yellow folder• Click yes to initialize a new git repository• Click commit and add your project to git • Make some changes and commit again • Make some changes and commit again• Make some changes and commit again• Make some changes and commit again
![Page 6: 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.](https://reader035.fdocuments.in/reader035/viewer/2022062408/56649ee55503460f94bf4078/html5/thumbnails/6.jpg)
Congratulations – That’s it!
• Now you know how to use GIT
![Page 7: 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.](https://reader035.fdocuments.in/reader035/viewer/2022062408/56649ee55503460f94bf4078/html5/thumbnails/7.jpg)
Version control, using Git 7
Git Extensions, .gitignore
1. Click “Add default ignores” button
2. Add a few more like .exe etc.3. Click the “Save” button
![Page 8: 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.](https://reader035.fdocuments.in/reader035/viewer/2022062408/56649ee55503460f94bf4078/html5/thumbnails/8.jpg)
Some Details… Branches
• In the previous exercise we avoided conflicts because we didn’t step back and worked alone.• Imagine we change our mind and wants to step back and continue
working
![Page 9: 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.](https://reader035.fdocuments.in/reader035/viewer/2022062408/56649ee55503460f94bf4078/html5/thumbnails/9.jpg)
Some Details… Merging
![Page 10: 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.](https://reader035.fdocuments.in/reader035/viewer/2022062408/56649ee55503460f94bf4078/html5/thumbnails/10.jpg)
Collaboration / backup
• Git is a decentralized distributed version control system
• If you create a remote repository somewhere you have still have an exact copy on your local machine. • If you share your remote repositiory with fellow students they get a
exact copy of the repository.
![Page 11: 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.](https://reader035.fdocuments.in/reader035/viewer/2022062408/56649ee55503460f94bf4078/html5/thumbnails/11.jpg)
Version control, using Git 11
Working with a remote repositoryFigure from http://git-scm.com/book/en/Distributed-Git-Contributing-to-a-Project
![Page 12: 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.](https://reader035.fdocuments.in/reader035/viewer/2022062408/56649ee55503460f94bf4078/html5/thumbnails/12.jpg)
Github.com || BitBucket.org
• Github is free for open source projects (use general open port)• Bitbucket offers a free closed project for 5 memebers
![Page 13: 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.](https://reader035.fdocuments.in/reader035/viewer/2022062408/56649ee55503460f94bf4078/html5/thumbnails/13.jpg)
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 remote repository• Commit to the projects and solve the conflicts…
![Page 14: 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.](https://reader035.fdocuments.in/reader035/viewer/2022062408/56649ee55503460f94bf4078/html5/thumbnails/14.jpg)
‘Feature Branch Workflow’
![Page 15: 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.](https://reader035.fdocuments.in/reader035/viewer/2022062408/56649ee55503460f94bf4078/html5/thumbnails/15.jpg)
Resources
• A free book onlinehttp://git-scm.com/book
• Videoshttp://git-scm.com/video/
• PDF: Git Magic by Ben Lynn
• Console online training
![Page 16: 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.](https://reader035.fdocuments.in/reader035/viewer/2022062408/56649ee55503460f94bf4078/html5/thumbnails/16.jpg)
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