Skip to content

setup_git

gollum edited this page Nov 24, 2014 · 3 revisions

Setting up git on your computer

See: https://cascade-wp6.github.io/git_intro/#/ For the slides of Flo's introduction to Git.

Installation

  • in Ubuntu: in any case you first will have to install git with

    	sudo apt-get update
    	sudo apt-get install git
    

    and configure it.

    	git config --global user.name "Your name"
    	git config --global user.email [email protected]
    	git config --global core.editor gedit
    

    This just tells git under which name commits should be performed and which texteditor to use for requiring messages.

  • in Windows: If you use a GitHub account to host your repositories, GitHub for Windows is a clean and convenient tool to use. It installs a command line shell that includes all the Linux utility that is required for git, including ssh and nice merging tools for file conflicts. However, the actual GUI is not very flexible and uses a completely different vocabulary (syncing, updating) than the actual git. You also could use independent GUI clients which have more functionality. TortoiseGIT and MsysGit provide a nice integration in the explorer right-click menu, besides providing a command line shell with all the tools and GUI's you need. In my case, I was using Cygwin before for ssh. Combining git and Cygwin's ssh is quite a challenge, because you need to tell the Cygwin programs, where your windows home directory is located. It's tricky but possible. However, I finally uninstalled Cygwin to run a much lighter and optimised shell. If you use one of the latter options, some steps might be necessary to configure git. Open the installed terminal/bash and type

    	git config --global user.name "Your name"
    	git config --global user.email [email protected]
    	git config --global core.editor notepad
    
  • Independend of your operating system, R Studio as well as Eclipse provide an integration for git. It allows you to add, commit and push from the application, without changing to a terminal window or other client.

Clone this wiki locally