GIT version control

Preview:

DESCRIPTION

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…? - PowerPoint PPT Presentation

Citation preview

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…?• 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

What do I need

https://code.google.com/p/gitextensions/http://git-scm.com/

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

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

Congratulations – That’s it!

• Now you know how to use GIT

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

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

Some Details… Merging

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.

Version control, using Git 11

Working with a remote repositoryFigure from http://git-scm.com/book/en/Distributed-Git-Contributing-to-a-Project

Github.com || BitBucket.org

• Github is free for open source projects (use general open port)• Bitbucket offers a free closed project 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 remote repository• Commit to the projects and solve the conflicts…

‘Feature Branch Workflow’

Resources

• A free book onlinehttp://git-scm.com/book

• Videoshttp://git-scm.com/video/

• PDF: Git Magic by Ben Lynn

• Console online training

Recommended