This shows you the differences between two versions of the page.
collab:git-ms [2012/02/24 14:04] c703101 |
collab:git-ms [2018/09/03 19:35] |
||
---|---|---|---|
Line 1: | Line 1: | ||
- | ===== Git on MS Windows ===== | ||
- | |||
- | I'm no fan of that OS but still some people are working with it - so here is a short installation tutorial for working with git on a ms windows machine. | ||
- | |||
- | ==== Software ==== | ||
- | You have to install three software packages: | ||
- | |||
- | * PuTTy: for the ssh connection and for generating ssh key pairs (http://the.earth.li/~sgtatham/putty/latest/x86/putty-0.61-installer.exe) | ||
- | * msysGit: provides git for windows (http://msysgit.googlecode.com/files/msysGit-fullinstall-1.7.6-preview20110708.exe) | ||
- | * TortoiseGit: a nice integration of the git commands into the Windows Explorer (like Tortoise SVN for Subversion) (http://code.google.com/p/tortoisegit/downloads/list) note that there is a 32-Bit and 64-Bit msi installer. | ||
- | |||
- | ==== Video Tutorials ==== | ||
- | |||
- | === PuTTY Installation and Key Generation === | ||
- | |||
- | <html> | ||
- | <br> | ||
- | <video width="560" height="340" controls preload="metadata"> | ||
- | <source src="/public/git/01__PuTTy-installation_and_key_generation.ogv" type='video/ogg; codecs="theora, vorbis"'> | ||
- | <applet code="com.fluendo.player.Cortado.class" archive="/public/cortado.jar" width="560" height="340"> | ||
- | <param name="autoPlay" value"false" /> | ||
- | <param name="url" value="/public/git/01__PuTTy-installation_and_key_generation.ogv"/> | ||
- | </applet> | ||
- | <p>You need to either install the Ogg Codec or Java to play this file.</p> | ||
- | </video> | ||
- | <br><br> | ||
- | </html> | ||
- | |||
- | |||
- | === msysGit Installation === | ||
- | |||
- | <html> | ||
- | <br> | ||
- | <video width="560" height="340" controls preload="metadata"> | ||
- | <source src="/public/git/02__msysGit-installation.ogv" type='video/ogg; codecs="theora, vorbis"'> | ||
- | <applet code="com.fluendo.player.Cortado.class" archive="/public/cortado.jar" width="560" height="340"> | ||
- | <param name="autoPlay" value"false" /> | ||
- | <param name="url" value="/public/git/02__msysGit-installation.ogv"/> | ||
- | </applet> | ||
- | <p>You need to either install the Ogg Codec or Java to play this file.</p> | ||
- | </video> | ||
- | </html> | ||
- | |||
- | === TortoiseGit Installation === | ||
- | <html> | ||
- | <br> | ||
- | <video width="560" height="340" controls preload="metadata"> | ||
- | <source src="/public/git/03__TortoiseGit_installation.ogv" type='video/ogg; codecs="theora, vorbis"'> | ||
- | <applet code="com.fluendo.player.Cortado.class" archive="/public/cortado.jar" width="560" height="340"> | ||
- | <param name="autoPlay" value"false" /> | ||
- | <param name="url" value="/public/git/03__TortoiseGit_installation.ogv"/> | ||
- | </applet> | ||
- | <p>You need to either install the Ogg Codec or Java to play this file.</p> | ||
- | </video> | ||
- | </html> | ||
- | |||
- | === TortoiseGit Configuration === | ||
- | |||
- | <html> | ||
- | <br> | ||
- | <video width="560" height="340" controls preload="metadata"> | ||
- | <source src="/public/git/04__TortoiseGit_configuration.ogv" type='video/ogg; codecs="theora, vorbis"'> | ||
- | <applet code="com.fluendo.player.Cortado.class" archive="/public/cortado.jar" width="560" height="340"> | ||
- | <param name="autoPlay" value"false" /> | ||
- | <param name="url" value="/public/git/04__TortoiseGit_configuration.ogv"/> | ||
- | </applet> | ||
- | <p>You need to either install the Ogg Codec or Java to play this file.</p> | ||
- | </video> | ||
- | |||
- | <br><br> | ||
- | </html> | ||
- | |||
- | === Clone a Git Repository === | ||
- | |||
- | clone a git repository and add a file to the local repository... | ||
- | <html> | ||
- | <video width="560" height="340" controls preload="metadata"> | ||
- | <source src="/public/git/05__Clone_git_repository.ogv" type='video/ogg; codecs="theora, vorbis"'> | ||
- | <applet code="com.fluendo.player.Cortado.class" archive="/public/cortado.jar" width="560" height="340"> | ||
- | <param name="autoPlay" value"false" /> | ||
- | <param name="url" value="/public/git/05__Clone_git_repository.ogv"/> | ||
- | </applet> | ||
- | <p>You need to either install the Ogg Codec or Java to play this file.</p> | ||
- | </video> | ||
- | <br><br> | ||
- | </html> | ||
- | |||
- | === Commit, Push and Pull === | ||
- | |||
- | commit local changes to the local repository and push the changes to the iis server. | ||
- | check for update with git pull. | ||
- | <html> | ||
- | <video width="560" height="340" controls preload="metadata"> | ||
- | <source src="/public/git/06__commit_push_and_pull_git_repo.ogv" type='video/ogg; codecs="theora, vorbis"'> | ||
- | <applet code="com.fluendo.player.Cortado.class" archive="/public/cortado.jar" width="560" height="340"> | ||
- | <param name="autoPlay" value"false" /> | ||
- | <param name="url" value="/public/git/06__commit_push_and_pull_git_repo.ogv"/> | ||
- | </applet> | ||
- | <p>You need to either install the Ogg Codec or Java to play this file.</p> | ||
- | </video> | ||
- | <br><br> | ||
- | </html> | ||
- | |||
- | |||
- | ==== Generating a ssh key-pair ==== | ||
- | * start puttygen.exe | ||
- | * press generate and move your mouse in the small screen | ||
- | * optional and i don't know if TortoiseGit can handle passphrase protected keys: you can type in a passphrase to protect your key - then you will be asked for it every time you connect | ||
- | * save private and public key | ||
- | |||
- | ==== Create a empty git repository ==== | ||
- | |||
- | Create a local repository - open Windows Explorer: | ||
- | * Create an empty folder and right-click into it. | ||
- | * Choose "Git Create repository here" | ||
- | * Create repository | ||
- | |||
- | Repository Settings (right click and go to repository settings) | ||
- | - Git -> Config | ||
- | * set your username | ||
- | * set your email | ||
- | * set your full name | ||
- | |||
- | - Git -> Remote (and click on "Add new") | ||
- | * insert url: ssh:/ /username@iis.uibk.ac.at:2222/projects/git/REPONAME | ||
- | * PuTTy Key: select the private key you generated | ||
- | |||
- | |||
- | ==== Pulling a Repository ==== | ||
- | |||
- | right click on the directory (git repository) | ||
- | * in the Tortoise-Git Menu select 'Pull' | ||
- | * for 'remote' select 'origin' | ||
- | * check 'AutoLoad Putty Key' | ||
- | * for 'Remote Branch' select or type 'master' | ||
- | |||
- | |||
- | {{tag>git Install}} | ||